1
0
forked from noxious/server

Added update & delete rules to entities

This commit is contained in:
2025-01-01 20:44:36 +01:00
parent 11d30351ba
commit 465219276d
16 changed files with 66 additions and 114 deletions

View File

@ -38,9 +38,6 @@ export class Item extends BaseEntity {
@Property()
updatedAt = new Date()
@OneToMany(() => CharacterItem, (characterItem) => characterItem.item)
characters = new Collection<CharacterItem>(this)
setId(id: UUID) {
this.id = id
return this
@ -121,13 +118,4 @@ export class Item extends BaseEntity {
getUpdatedAt() {
return this.updatedAt
}
setCharacters(characters: Collection<CharacterItem>) {
this.characters = characters
return this
}
getCharacters() {
return this.characters
}
}