1
0
forked from noxious/server
noxious_server/src/entities/characterEquipment.ts
2024-12-24 22:08:08 +01:00

19 lines
483 B
TypeScript

import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
import { Character } from './character';
import { CharacterItem } from './characterItem';
import { CharacterEquipmentSlotType } from '../utilities/enums';
@Entity()
export class CharacterEquipment {
@PrimaryKey()
id!: number;
@Property()
slot!: CharacterEquipmentSlotType;
@ManyToOne(() => Character)
character!: Character;
@ManyToOne(() => CharacterItem)
characterItem!: CharacterItem;
}