change folder structure
This commit is contained in:
parent
a332e4d779
commit
a09c75a998
167 changed files with 262 additions and 246 deletions
14
src/entity/configuration/award.ts
Normal file
14
src/entity/configuration/award.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { memberAwards } from "../club/member/memberAwards";
|
||||
|
||||
@Entity()
|
||||
export class award {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
award: string;
|
||||
|
||||
@OneToMany(() => memberAwards, (member) => member.award)
|
||||
members: memberAwards[];
|
||||
}
|
33
src/entity/configuration/calendarType.ts
Normal file
33
src/entity/configuration/calendarType.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { calendar } from "../club/calendar";
|
||||
|
||||
@Entity()
|
||||
export class calendarType {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
type: string;
|
||||
|
||||
@Column({ type: "boolean", default: false }) // none specified cal dav request
|
||||
nscdr: boolean;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
color: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: true, default: null })
|
||||
passphrase: string | null;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: false, default: "" })
|
||||
externalPrefix: string;
|
||||
|
||||
@Column({ type: "boolean", default: false })
|
||||
sendToWebpage: boolean;
|
||||
|
||||
@OneToMany(() => calendar, (c) => c.type, {
|
||||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
calendar: calendar[];
|
||||
}
|
30
src/entity/configuration/communicationType.ts
Normal file
30
src/entity/configuration/communicationType.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { communication } from "../club/member/communication";
|
||||
import { CommunicationFieldType, communicationFieldTypes } from "../../type/fieldTypes";
|
||||
|
||||
@Entity()
|
||||
export class communicationType {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
type: string;
|
||||
|
||||
@Column({
|
||||
type: "varchar",
|
||||
length: 255,
|
||||
default: "",
|
||||
transformer: {
|
||||
from(value: string): Array<CommunicationFieldType> {
|
||||
return communicationFieldTypes.filter((e) => value?.includes(e));
|
||||
},
|
||||
to(value: Array<CommunicationFieldType>): string {
|
||||
return value.filter((e) => communicationFieldTypes.includes(e)).join(",");
|
||||
},
|
||||
},
|
||||
})
|
||||
useColumns: Array<CommunicationFieldType>;
|
||||
|
||||
@OneToMany(() => communication, (communication) => communication.type)
|
||||
communications: communication[];
|
||||
}
|
14
src/entity/configuration/executivePosition.ts
Normal file
14
src/entity/configuration/executivePosition.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { memberExecutivePositions } from "../club/member/memberExecutivePositions";
|
||||
|
||||
@Entity()
|
||||
export class executivePosition {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
position: string;
|
||||
|
||||
@OneToMany(() => memberExecutivePositions, (memberExecutivePositions) => memberExecutivePositions.executivePosition)
|
||||
members: memberExecutivePositions[];
|
||||
}
|
14
src/entity/configuration/membershipStatus.ts
Normal file
14
src/entity/configuration/membershipStatus.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { membership } from "../club/member/membership";
|
||||
|
||||
@Entity()
|
||||
export class membershipStatus {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
status: string;
|
||||
|
||||
@OneToMany(() => membership, (membership) => membership.status)
|
||||
memberships: membership[];
|
||||
}
|
31
src/entity/configuration/newsletterConfig.ts
Normal file
31
src/entity/configuration/newsletterConfig.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { NewsletterConfigType } from "../../enums/newsletterConfigType";
|
||||
import { communicationType } from "./communicationType";
|
||||
|
||||
@Entity()
|
||||
export class newsletterConfig {
|
||||
@PrimaryColumn()
|
||||
comTypeId: number;
|
||||
|
||||
@Column({
|
||||
type: "varchar",
|
||||
length: "255",
|
||||
transformer: {
|
||||
to(value: NewsletterConfigType) {
|
||||
return value.toString();
|
||||
},
|
||||
from(value: string) {
|
||||
return NewsletterConfigType[value as keyof typeof NewsletterConfigType];
|
||||
},
|
||||
},
|
||||
})
|
||||
config: NewsletterConfigType;
|
||||
|
||||
@ManyToOne(() => communicationType, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
comType: communicationType;
|
||||
}
|
17
src/entity/configuration/qualification.ts
Normal file
17
src/entity/configuration/qualification.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { memberQualifications } from "../club/member/memberQualifications";
|
||||
|
||||
@Entity()
|
||||
export class qualification {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
qualification: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: true })
|
||||
description?: string;
|
||||
|
||||
@OneToMany(() => memberQualifications, (memberQualifications) => memberQualifications.qualification)
|
||||
members: memberQualifications[];
|
||||
}
|
13
src/entity/configuration/query.ts
Normal file
13
src/entity/configuration/query.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { Column, Entity, PrimaryColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class query {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
title: string;
|
||||
|
||||
@Column({ type: "text", default: "" })
|
||||
query: string;
|
||||
}
|
15
src/entity/configuration/salutation.ts
Normal file
15
src/entity/configuration/salutation.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { memberAwards } from "../club/member/memberAwards";
|
||||
import { member } from "../club/member/member";
|
||||
|
||||
@Entity()
|
||||
export class salutation {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
salutation: string;
|
||||
|
||||
@OneToMany(() => member, (member) => member.salutation)
|
||||
members: member[];
|
||||
}
|
30
src/entity/configuration/template.ts
Normal file
30
src/entity/configuration/template.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { Column, Entity, PrimaryColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class template {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
template: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: true })
|
||||
description?: string;
|
||||
|
||||
@Column({
|
||||
type: "text",
|
||||
default: "{}",
|
||||
transformer: {
|
||||
to(value: object) {
|
||||
return JSON.stringify(value);
|
||||
},
|
||||
from(value: string) {
|
||||
return JSON.parse(value);
|
||||
},
|
||||
},
|
||||
})
|
||||
design: object;
|
||||
|
||||
@Column({ type: "text", default: "" })
|
||||
html: string;
|
||||
}
|
45
src/entity/configuration/templateUsage.ts
Normal file
45
src/entity/configuration/templateUsage.ts
Normal file
|
@ -0,0 +1,45 @@
|
|||
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}`|`${PermissionModule}.${string}`;
|
||||
|
||||
@Column({ type: "int", nullable: true })
|
||||
headerId: number | null;
|
||||
|
||||
@Column({ type: "int", nullable: true })
|
||||
bodyId: number | null;
|
||||
|
||||
@Column({ type: "int", nullable: true })
|
||||
footerId: number | null;
|
||||
|
||||
@Column({ type: "int", nullable: true })
|
||||
headerHeight: number | null;
|
||||
|
||||
@Column({ type: "int", nullable: true })
|
||||
footerHeight: 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