2025-02-01 13:11:10 +01:00
|
|
|
import { Column, ColumnType, Entity, OneToMany, PrimaryColumn } from "typeorm";
|
2025-01-29 16:49:34 +01:00
|
|
|
import { protocolAgenda } from "./protocolAgenda";
|
|
|
|
import { protocolDecision } from "./protocolDecision";
|
|
|
|
import { protocolPresence } from "./protocolPresence";
|
|
|
|
import { protocolPrintout } from "./protocolPrintout";
|
|
|
|
import { protocolVoting } from "./protocolVoting";
|
2025-02-01 13:11:10 +01:00
|
|
|
import { getTypeByORM } from "../../../migrations/ormHelper";
|
2024-10-03 13:31:05 +02:00
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class protocol {
|
|
|
|
@PrimaryColumn({ generated: "increment", type: "int" })
|
|
|
|
id: number;
|
|
|
|
|
2025-01-28 11:09:42 +01:00
|
|
|
@Column({ type: "varchar", length: 255, unique: true })
|
2024-10-03 13:31:05 +02:00
|
|
|
title: string;
|
|
|
|
|
2025-02-01 13:11:10 +01:00
|
|
|
@Column({ type: getTypeByORM("date").type as ColumnType })
|
2024-10-03 13:31:05 +02:00
|
|
|
date: Date;
|
2024-10-04 12:47:13 +02:00
|
|
|
|
2025-02-01 13:11:10 +01:00
|
|
|
@Column({ type: getTypeByORM("time").type as ColumnType, nullable: true })
|
2024-10-04 12:47:13 +02:00
|
|
|
starttime: Date;
|
|
|
|
|
2025-02-01 13:11:10 +01:00
|
|
|
@Column({ type: getTypeByORM("time").type as ColumnType, nullable: true })
|
2024-10-04 12:47:13 +02:00
|
|
|
endtime: Date;
|
|
|
|
|
2024-10-14 17:03:33 +02:00
|
|
|
@Column({ type: "text", nullable: true })
|
2024-10-04 12:47:13 +02:00
|
|
|
summary: string;
|
2025-01-29 16:49:34 +01:00
|
|
|
|
|
|
|
@OneToMany(() => protocolAgenda, (agenda) => agenda.protocol, { cascade: ["insert"] })
|
|
|
|
agendas: protocolAgenda[];
|
|
|
|
|
|
|
|
@OneToMany(() => protocolDecision, (decision) => decision.protocol, { cascade: ["insert"] })
|
|
|
|
decisions: protocolDecision[];
|
|
|
|
|
|
|
|
@OneToMany(() => protocolPresence, (presence) => presence.protocol, { cascade: ["insert"] })
|
|
|
|
presences: protocolPresence[];
|
|
|
|
|
|
|
|
@OneToMany(() => protocolPrintout, (printout) => printout.protocol, { cascade: ["insert"] })
|
|
|
|
printouts: protocolPrintout[];
|
|
|
|
|
|
|
|
@OneToMany(() => protocolVoting, (voting) => voting.protocol, { cascade: ["insert"] })
|
|
|
|
votings: protocolVoting[];
|
2024-10-03 13:31:05 +02:00
|
|
|
}
|