template preparation

This commit is contained in:
Julian Krauser 2024-12-23 14:00:50 +01:00
parent 5f18e614be
commit 6cb8ca0a12
16 changed files with 414 additions and 21 deletions

View file

@ -40,7 +40,7 @@ export class member {
birthdate: Date;
@OneToMany(() => communication, (communications) => communications.member)
communications: communication;
communications: communication[];
@OneToOne(() => communication, {
nullable: true,

View file

@ -0,0 +1,39 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { template } from "./template";
import { PermissionModule } from "../type/permissionTypes";
@Entity()
export class templateUsage {
@PrimaryColumn({ type: "varchar", length: 255 })
scope: PermissionModule;
@Column({ type: "number", nullable: true })
headerId: number | null;
@Column({ type: "number", nullable: true })
bodyId: number | null;
@Column({ type: "number", nullable: true })
footerId: number | null;
@ManyToOne(() => template, {
nullable: true,
onDelete: "RESTRICT",
onUpdate: "RESTRICT",
})
header: template | null;
@ManyToOne(() => template, {
nullable: true,
onDelete: "RESTRICT",
onUpdate: "RESTRICT",
})
body: template | null;
@ManyToOne(() => template, {
nullable: true,
onDelete: "RESTRICT",
onUpdate: "RESTRICT",
})
footer: template | null;
}