server/src/entities/zone.ts
2024-12-24 22:08:08 +01:00

15 lines
413 B
TypeScript

import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
import { Character } from './character';
import { Chat } from './chat';
@Entity()
export class Zone {
@PrimaryKey()
id!: number;
@OneToMany(() => Character, character => character.zone)
characters = new Collection<Character>(this);
@OneToMany(() => Chat, chat => chat.zone)
chats = new Collection<Chat>(this);
}