Enum bug fix

This commit is contained in:
2024-12-25 13:49:43 +01:00
parent 95f4c58110
commit aa3ee8f0af
3 changed files with 107 additions and 3 deletions

View File

@ -37,6 +37,6 @@ export class MapObject {
@Property()
updatedAt = new Date()
@OneToMany(() => ZoneObject, (zoneObject) => zoneObject.object)
@OneToMany(() => ZoneObject, (zoneObject) => zoneObject.mapObject)
zoneObjects = new Collection<ZoneObject>(this)
}

View File

@ -1,4 +1,4 @@
import { Entity, ManyToOne, OneToOne, PrimaryKey, Property } from '@mikro-orm/core'
import { Entity, Enum, ManyToOne, OneToOne, PrimaryKey, Property } from '@mikro-orm/core'
import { Zone } from './zone'
import { ZoneEventTileType } from '#utilities/enums'
import { ZoneEventTileTeleport } from './zoneEventTileTeleport'
@ -11,7 +11,7 @@ export class ZoneEventTile {
@ManyToOne(() => Zone)
zone!: Zone
@Property()
@Enum(() => ZoneEventTileType)
type!: ZoneEventTileType
@Property()