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:
Julian Krauser 2024-11-07 11:09:52 +01:00
commit 98eb870385
48 changed files with 2672 additions and 9 deletions

22
src/entity/protocol.ts Normal file
View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}

View 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;
}