Merge branch 'main' into #1-account-management
# Conflicts: # src/data-source.ts
This commit is contained in:
commit
273745f830
66 changed files with 3721 additions and 10 deletions
52
src/entity/calendar.ts
Normal file
52
src/entity/calendar.ts
Normal file
|
@ -0,0 +1,52 @@
|
|||
import {
|
||||
Column,
|
||||
Entity,
|
||||
ManyToOne,
|
||||
PrimaryColumn,
|
||||
PrimaryGeneratedColumn,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
AfterUpdate,
|
||||
BeforeUpdate,
|
||||
} from "typeorm";
|
||||
import { calendarType } from "./calendarType";
|
||||
|
||||
@Entity()
|
||||
export class calendar {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({ type: "datetime", nullable: false })
|
||||
starttime: Date;
|
||||
|
||||
@Column({ type: "datetime", nullable: false })
|
||||
endtime: Date;
|
||||
|
||||
@Column({ type: "varchar", length: 255, nullable: false })
|
||||
title: string;
|
||||
|
||||
@Column({ type: "text", nullable: true })
|
||||
content: string;
|
||||
|
||||
@Column({ type: "text", nullable: true })
|
||||
location: string;
|
||||
|
||||
@Column({ type: "boolean", default: false })
|
||||
allDay: boolean;
|
||||
|
||||
@Column({ type: "int", default: 1 })
|
||||
sequence: number;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn()
|
||||
updatedAt: Date;
|
||||
|
||||
@ManyToOne(() => calendarType, (t) => t.calendar, {
|
||||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
type: calendarType;
|
||||
}
|
24
src/entity/calendarType.ts
Normal file
24
src/entity/calendarType.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { Column, Entity, OneToMany, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { calendar } from "./calendar";
|
||||
|
||||
@Entity()
|
||||
export class calendarType {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
type: string;
|
||||
|
||||
@Column({ type: "boolean" }) // none specified cal dav request
|
||||
nscdr: boolean;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
color: string;
|
||||
|
||||
@OneToMany(() => calendar, (c) => c.type, {
|
||||
nullable: false,
|
||||
onDelete: "RESTRICT",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
calendar: calendar[];
|
||||
}
|
22
src/entity/protocol.ts
Normal file
22
src/entity/protocol.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { Column, Entity, PrimaryColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class protocol {
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
title: string;
|
||||
|
||||
@Column({ type: "date" })
|
||||
date: Date;
|
||||
|
||||
@Column({ type: "time", nullable: true })
|
||||
starttime: Date;
|
||||
|
||||
@Column({ type: "time", nullable: true })
|
||||
endtime: Date;
|
||||
|
||||
@Column({ type: "text", nullable: true })
|
||||
summary: string;
|
||||
}
|
24
src/entity/protocolAgenda.ts
Normal file
24
src/entity/protocolAgenda.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
|
||||
@Entity()
|
||||
export class protocolAgenda {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
topic: string;
|
||||
|
||||
@Column({ type: "text", default: "" })
|
||||
context: string;
|
||||
|
||||
@Column()
|
||||
protocolId: number;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
24
src/entity/protocolDecision.ts
Normal file
24
src/entity/protocolDecision.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
|
||||
@Entity()
|
||||
export class protocolDecision {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
topic: string;
|
||||
|
||||
@Column({ type: "text", default: "" })
|
||||
context: string;
|
||||
|
||||
@Column()
|
||||
protocolId: number;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
26
src/entity/protocolPresence.ts
Normal file
26
src/entity/protocolPresence.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
import { member } from "./member";
|
||||
|
||||
@Entity()
|
||||
export class protocolPresence {
|
||||
@PrimaryColumn()
|
||||
memberId: number;
|
||||
|
||||
@PrimaryColumn()
|
||||
protocolId: number;
|
||||
|
||||
@ManyToOne(() => member, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
member: member;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
30
src/entity/protocolPrintout.ts
Normal file
30
src/entity/protocolPrintout.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
|
||||
@Entity()
|
||||
export class protocolPrintout {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
title: string;
|
||||
|
||||
@Column({ type: "int" })
|
||||
iteration: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
filename: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@Column()
|
||||
protocolId: number;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
33
src/entity/protocolVoting.ts
Normal file
33
src/entity/protocolVoting.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { protocol } from "./protocol";
|
||||
|
||||
@Entity()
|
||||
export class protocolVoting {
|
||||
@PrimaryGeneratedColumn("increment")
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
topic: string;
|
||||
|
||||
@Column({ type: "text", default: "" })
|
||||
context: string;
|
||||
|
||||
@Column({ type: "int", default: 0 })
|
||||
favour: number;
|
||||
|
||||
@Column({ type: "int", default: 0 })
|
||||
abstain: number;
|
||||
|
||||
@Column({ type: "int", default: 0 })
|
||||
against: number;
|
||||
|
||||
@Column()
|
||||
protocolId: number;
|
||||
|
||||
@ManyToOne(() => protocol, {
|
||||
nullable: false,
|
||||
onDelete: "CASCADE",
|
||||
onUpdate: "RESTRICT",
|
||||
})
|
||||
protocol: protocol;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue