factory and restructure view models

This commit is contained in:
Julian Krauser 2025-05-28 18:30:00 +02:00
parent fcbfe560c3
commit 117ced38ab
33 changed files with 479 additions and 46 deletions

View file

@ -29,7 +29,7 @@ export class wearable {
wearableTypeId: string;
@Column()
wearerId: string;
wearerId?: string;
@ManyToOne(() => wearableType, {
nullable: false,
@ -39,11 +39,11 @@ export class wearable {
wearableType: wearableType;
@ManyToOne(() => member, {
nullable: false,
nullable: true,
onDelete: "SET NULL",
onUpdate: "RESTRICT",
})
wearer: member;
wearer?: member;
@OneToMany(() => damageReport, (d) => d.wearable, { cascade: ["insert"] })
reports: damageReport[];