create and restore backups
This commit is contained in:
parent
6ae463a784
commit
f78097b616
16 changed files with 696 additions and 21 deletions
|
@ -47,6 +47,7 @@ export class calendar {
|
|||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
type: calendarType;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ export class communication {
|
|||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
type: communicationType;
|
||||
}
|
||||
|
|
|
@ -29,26 +29,27 @@ export class member {
|
|||
@Column()
|
||||
salutationId: number;
|
||||
|
||||
@OneToMany(() => communication, (communications) => communications.member)
|
||||
communications: communication[];
|
||||
|
||||
@ManyToOne(() => salutation, (salutation) => salutation.members, {
|
||||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
salutation: salutation;
|
||||
|
||||
@OneToMany(() => membership, (membership) => membership.member)
|
||||
@OneToMany(() => communication, (communications) => communications.member, { cascade: ["insert"] })
|
||||
communications: communication[];
|
||||
|
||||
@OneToMany(() => membership, (membership) => membership.member, { cascade: ["insert"] })
|
||||
memberships: membership[];
|
||||
|
||||
@OneToMany(() => memberAwards, (awards) => awards.member)
|
||||
@OneToMany(() => memberAwards, (awards) => awards.member, { cascade: ["insert"] })
|
||||
awards: memberAwards[];
|
||||
|
||||
@OneToMany(() => memberExecutivePositions, (executivePositions) => executivePositions.member)
|
||||
@OneToMany(() => memberExecutivePositions, (executivePositions) => executivePositions.member, { cascade: ["insert"] })
|
||||
positions: memberExecutivePositions[];
|
||||
|
||||
@OneToMany(() => memberQualifications, (qualifications) => qualifications.member)
|
||||
@OneToMany(() => memberQualifications, (qualifications) => qualifications.member, { cascade: ["insert"] })
|
||||
qualifications: memberQualifications[];
|
||||
|
||||
firstMembershipEntry?: membership;
|
||||
|
|
|
@ -33,6 +33,7 @@ export class memberAwards {
|
|||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
award: award;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ export class memberExecutivePositions {
|
|||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
executivePosition: executivePosition;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ export class memberQualifications {
|
|||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
qualification: qualification;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ export class membership {
|
|||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
@JoinColumn()
|
||||
status: membershipStatus;
|
||||
|
|
|
@ -30,16 +30,17 @@ export class newsletter {
|
|||
@Column({ type: "int", nullable: true })
|
||||
recipientsByQueryId?: number;
|
||||
|
||||
@OneToMany(() => newsletterDates, (dates) => dates.newsletter)
|
||||
@OneToMany(() => newsletterDates, (dates) => dates.newsletter, { cascade: ["insert"] })
|
||||
dates: newsletterDates[];
|
||||
|
||||
@OneToMany(() => newsletterRecipients, (recipient) => recipient.newsletter)
|
||||
@OneToMany(() => newsletterRecipients, (recipient) => recipient.newsletter, { cascade: ["insert"] })
|
||||
recipients: newsletterRecipients[];
|
||||
|
||||
@ManyToOne(() => query, {
|
||||
nullable: true,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
recipientsByQuery?: query;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
import { Column, Entity, PrimaryColumn } from "typeorm";
|
||||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { protocolAgenda } from "./protocolAgenda";
|
||||
import { protocolDecision } from "./protocolDecision";
|
||||
import { protocolPresence } from "./protocolPresence";
|
||||
import { protocolPrintout } from "./protocolPrintout";
|
||||
import { protocolVoting } from "./protocolVoting";
|
||||
|
||||
@Entity()
|
||||
export class protocol {
|
||||
|
@ -19,4 +24,19 @@ export class protocol {
|
|||
|
||||
@Column({ type: "text", nullable: true })
|
||||
summary: string;
|
||||
|
||||
@OneToMany(() => protocolAgenda, (agenda) => agenda.protocol, { cascade: ["insert"] })
|
||||
agendas: protocolAgenda[];
|
||||
|
||||
@OneToMany(() => protocolDecision, (decision) => decision.protocol, { cascade: ["insert"] })
|
||||
decisions: protocolDecision[];
|
||||
|
||||
@OneToMany(() => protocolPresence, (presence) => presence.protocol, { cascade: ["insert"] })
|
||||
presences: protocolPresence[];
|
||||
|
||||
@OneToMany(() => protocolPrintout, (printout) => printout.protocol, { cascade: ["insert"] })
|
||||
printouts: protocolPrintout[];
|
||||
|
||||
@OneToMany(() => protocolVoting, (voting) => voting.protocol, { cascade: ["insert"] })
|
||||
votings: protocolVoting[];
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import { communicationType } from "./communicationType";
|
|||
|
||||
@Entity()
|
||||
export class newsletterConfig {
|
||||
@PrimaryColumn({ type: "int" })
|
||||
@PrimaryColumn()
|
||||
comTypeId: number;
|
||||
|
||||
@Column({
|
||||
|
@ -25,6 +25,7 @@ export class newsletterConfig {
|
|||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
comType: communicationType;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,6 @@ export class role {
|
|||
})
|
||||
users: user[];
|
||||
|
||||
@OneToMany(() => rolePermission, (rolePermission) => rolePermission.role)
|
||||
@OneToMany(() => rolePermission, (rolePermission) => rolePermission.role, { cascade: ["insert"] })
|
||||
permissions: rolePermission[];
|
||||
}
|
||||
|
|
|
@ -29,12 +29,13 @@ export class user {
|
|||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
@JoinTable({
|
||||
name: "user_roles",
|
||||
})
|
||||
roles: role[];
|
||||
|
||||
@OneToMany(() => userPermission, (userPermission) => userPermission.user)
|
||||
@OneToMany(() => userPermission, (userPermission) => userPermission.user, { cascade: ["insert"] })
|
||||
permissions: userPermission[];
|
||||
}
|
||||
|
|
|
@ -21,6 +21,6 @@ export class webapi {
|
|||
@Column({ type: "date", nullable: true })
|
||||
expiry?: Date;
|
||||
|
||||
@OneToMany(() => webapiPermission, (apiPermission) => apiPermission.webapi)
|
||||
@OneToMany(() => webapiPermission, (apiPermission) => apiPermission.webapi, { cascade: ["insert"] })
|
||||
permissions: webapiPermission[];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue