15 lines
413 B
TypeScript
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);
|
|
} |