Merge branch 'milestone/ff-admin-unit' into unit/#102-base-management
# Conflicts: # src/data-source.ts
This commit is contained in:
commit
e056db053b
68 changed files with 1807 additions and 1521 deletions
|
@ -45,7 +45,7 @@ export class calendar {
|
|||
@UpdateDateColumn()
|
||||
updatedAt: Date;
|
||||
|
||||
@Column({ type: "varchar", nullable: true, default: null, unique: true })
|
||||
@Column({ type: "varchar", length: "255", nullable: true, default: null, unique: true })
|
||||
webpageId: string;
|
||||
|
||||
@ManyToOne(() => calendarType, (t) => t.calendar, {
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
OneToMany,
|
||||
OneToOne,
|
||||
PrimaryColumn,
|
||||
PrimaryGeneratedColumn,
|
||||
} from "typeorm";
|
||||
import { membership } from "./membership";
|
||||
import { memberAwards } from "./memberAwards";
|
||||
|
@ -16,10 +17,11 @@ import { memberExecutivePositions } from "./memberExecutivePositions";
|
|||
import { communication } from "./communication";
|
||||
import { salutation } from "../../configuration/salutation";
|
||||
import { getTypeByORM } from "../../../migrations/ormHelper";
|
||||
import { memberEducations } from "./memberEducations";
|
||||
|
||||
@Entity()
|
||||
export class member {
|
||||
@PrimaryColumn({ generated: "uuid", type: "varchar" })
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
|
@ -37,6 +39,9 @@ export class member {
|
|||
@Column({ type: "varchar", length: 255, unique: true, nullable: true })
|
||||
internalId?: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: true })
|
||||
note?: string;
|
||||
|
||||
@Column()
|
||||
salutationId: number;
|
||||
|
||||
|
@ -66,6 +71,9 @@ export class member {
|
|||
@OneToMany(() => memberQualifications, (qualifications) => qualifications.member, { cascade: ["insert"] })
|
||||
qualifications: memberQualifications[];
|
||||
|
||||
@OneToMany(() => memberEducations, (educations) => educations.member, { cascade: ["insert"] })
|
||||
educations: memberEducations[];
|
||||
|
||||
firstMembershipEntry?: membership;
|
||||
lastMembershipEntry?: membership;
|
||||
preferredCommunication?: Array<communication>;
|
||||
|
|
43
src/entity/club/member/memberEducations.ts
Normal file
43
src/entity/club/member/memberEducations.ts
Normal file
|
@ -0,0 +1,43 @@
|
|||
import { Column, ColumnType, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { member } from "./member";
|
||||
import { education } from "../../configuration/education";
|
||||
import { getTypeByORM } from "../../../migrations/ormHelper";
|
||||
|
||||
@Entity()
|
||||
export class memberEducations {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: getTypeByORM("date").type as ColumnType })
|
||||
start: Date;
|
||||
|
||||
@Column({ type: getTypeByORM("date").type as ColumnType, nullable: true })
|
||||
end?: Date;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: true })
|
||||
note?: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: true })
|
||||
place?: string;
|
||||
|
||||
@Column()
|
||||
memberId: string;
|
||||
|
||||
@Column()
|
||||
educationId: number;
|
||||
|
||||
@ManyToOne(() => member, (member) => member.awards, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
member: member;
|
||||
|
||||
@ManyToOne(() => education, (education) => education.members, {
|
||||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
cascade: ["insert"],
|
||||
})
|
||||
education: education;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import { Column, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { Column, CreateDateColumn, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { newsletterDates } from "./newsletterDates";
|
||||
import { newsletterRecipients } from "./newsletterRecipients";
|
||||
import { query } from "../../configuration/query";
|
||||
|
@ -14,6 +14,9 @@ export class newsletter {
|
|||
@Column({ type: "varchar", length: 255, default: "" })
|
||||
description: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@Column({ type: "text", default: "" })
|
||||
newsletterTitle: string;
|
||||
|
||||
|
|
17
src/entity/configuration/education.ts
Normal file
17
src/entity/configuration/education.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { memberEducations } from "../club/member/memberEducations";
|
||||
|
||||
@Entity()
|
||||
export class education {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
education: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: true })
|
||||
description?: string;
|
||||
|
||||
@OneToMany(() => memberEducations, (memberEducations) => memberEducations.education)
|
||||
members: memberEducations[];
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
import { Column, Entity, PrimaryColumn, UpdateDateColumn } from "typeorm";
|
||||
import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class query {
|
||||
@PrimaryColumn({ generated: "uuid", type: "varchar" })
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true })
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Column, Entity, JoinTable, ManyToMany, OneToMany, PrimaryColumn } from "typeorm";
|
||||
import { Column, Entity, JoinTable, ManyToMany, OneToMany, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { role } from "./role";
|
||||
import { userPermission } from "./user_permission";
|
||||
import { LoginRoutineEnum } from "../../enums/loginRoutineEnum";
|
||||
|
@ -7,7 +7,7 @@ import { APPLICATION_SECRET } from "../../env.defaults";
|
|||
|
||||
@Entity()
|
||||
export class user {
|
||||
@PrimaryColumn({ generated: "uuid", type: "varchar" })
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "varchar", unique: true, length: 255 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue