1
0
forked from noxious/server

Added missing entities( zoneEffect, zoneEventTile, zoneEventTileTeleport, zoneObject)

This commit is contained in:
2024-12-25 03:19:53 +01:00
parent b4989aac26
commit 95f4c58110
20 changed files with 489 additions and 391 deletions

42
src/entities/mapObject.ts Normal file
View 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)
}