forked from noxious/server
Added missing entities( zoneEffect, zoneEventTile, zoneEventTileTeleport, zoneObject)
This commit is contained in:
42
src/entities/mapObject.ts
Normal file
42
src/entities/mapObject.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { ZoneObject } from './zoneObject'
|
||||
1
|
||||
@Entity()
|
||||
export class MapObject {
|
||||
@PrimaryKey()
|
||||
id = randomUUID()
|
||||
|
||||
@Property()
|
||||
name!: string
|
||||
|
||||
@Property({ type: 'json', nullable: true })
|
||||
tags?: any
|
||||
|
||||
@Property()
|
||||
originX = 0
|
||||
|
||||
@Property()
|
||||
originY = 0
|
||||
|
||||
@Property()
|
||||
isAnimated = false
|
||||
|
||||
@Property()
|
||||
frameRate = 0
|
||||
|
||||
@Property()
|
||||
frameWidth = 0
|
||||
|
||||
@Property()
|
||||
frameHeight = 0
|
||||
|
||||
@Property()
|
||||
createdAt = new Date()
|
||||
|
||||
@Property()
|
||||
updatedAt = new Date()
|
||||
|
||||
@OneToMany(() => ZoneObject, (zoneObject) => zoneObject.object)
|
||||
zoneObjects = new Collection<ZoneObject>(this)
|
||||
}
|
Reference in New Issue
Block a user