move sendNewsletter flag to communication table

This commit is contained in:
Julian Krauser 2025-01-25 16:37:52 +01:00
parent b678067874
commit 46ad96c470
12 changed files with 171 additions and 130 deletions

View file

@ -13,6 +13,9 @@ export class communication {
@Column({ type: "boolean", default: false })
isSMSAlarming: boolean;
@Column({ type: "boolean", default: false })
isSendNewsletter: boolean;
@Column({ type: "varchar", length: 255, nullable: true })
mobile: string;

View file

@ -32,14 +32,6 @@ export class member {
@OneToMany(() => communication, (communications) => communications.member)
communications: communication[];
@OneToOne(() => communication, {
nullable: true,
onDelete: "SET NULL",
onUpdate: "RESTRICT",
})
@JoinColumn()
sendNewsletter?: communication;
@ManyToOne(() => salutation, (salutation) => salutation.members)
salutation: salutation;
@ -59,4 +51,5 @@ export class member {
lastMembershipEntry?: membership;
preferredCommunication?: Array<communication>;
smsAlarming?: Array<communication>;
sendNewsletter?: communication;
}