Merge branch 'main' into #3-calendar
# Conflicts: # package-lock.json # src/data-source.ts # src/routes/admin/index.ts # src/type/permissionTypes.ts
This commit is contained in:
commit
98eb870385
48 changed files with 2672 additions and 9 deletions
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