1
0
forked from noxious/server

Improved entities, ran formatting, utilise getters and setters

This commit is contained in:
2024-12-26 16:45:00 +01:00
parent 691abb7c4f
commit 4a963b4359
18 changed files with 68 additions and 97 deletions

View File

@ -42,17 +42,17 @@ export class Character extends BaseEntity {
rotation = 0
// Customization
@ManyToOne(() => CharacterType, { nullable: true })
@ManyToOne()
characterType?: CharacterType
@ManyToOne(() => CharacterHair, { nullable: true })
@ManyToOne()
characterHair?: CharacterHair
// Inventory
@OneToMany(() => CharacterItem, (item) => item.character)
@OneToMany({ mappedBy: 'character' })
items = new Collection<CharacterItem>(this)
@OneToMany(() => CharacterEquipment, (equipment) => equipment.character)
@OneToMany({ mappedBy: 'character' })
equipment = new Collection<CharacterEquipment>(this)
// Stats