forked from noxious/server
19 lines
483 B
TypeScript
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;
|
|
} |