server/src/entities/zoneObject.ts

29 lines
467 B
TypeScript

import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
import { Zone } from './zone'
import { MapObject } from '#entities/mapObject'
//@TODO : Rename mapObject
@Entity()
export class ZoneObject {
@PrimaryKey()
id!: string
@ManyToOne(() => Zone)
zone!: Zone
@ManyToOne(() => MapObject)
mapObject!: MapObject
@Property()
depth = 0
@Property()
isRotated = false
@Property()
positionX = 0
@Property()
positionY = 0
}