template preparation
This commit is contained in:
parent
5f18e614be
commit
6cb8ca0a12
16 changed files with 414 additions and 21 deletions
|
@ -40,7 +40,7 @@ export class member {
|
|||
birthdate: Date;
|
||||
|
||||
@OneToMany(() => communication, (communications) => communications.member)
|
||||
communications: communication;
|
||||
communications: communication[];
|
||||
|
||||
@OneToOne(() => communication, {
|
||||
nullable: true,
|
||||
|
|
39
src/entity/templateUsage.ts
Normal file
39
src/entity/templateUsage.ts
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue