Added ORM entities

This commit is contained in:
2024-12-24 22:08:08 +01:00
parent 40c24cee10
commit 8980691409
15 changed files with 403 additions and 1 deletions

21
src/entities/chat.ts Normal file
View File

@ -0,0 +1,21 @@
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
import { Character } from './character';
import { Zone } from './zone';
@Entity()
export class Chat {
@PrimaryKey()
id!: number;
@ManyToOne(() => Character)
character!: Character;
@ManyToOne(() => Zone)
zone!: Zone;
@Property()
message!: string;
@Property()
createdAt = new Date();
}