ff-admin-server/src/entity/club/protocol/protocol.ts

43 lines
1.3 KiB
TypeScript
Raw Normal View History

2025-01-29 16:49:34 +01:00
import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
import { protocolAgenda } from "./protocolAgenda";
import { protocolDecision } from "./protocolDecision";
import { protocolPresence } from "./protocolPresence";
import { protocolPrintout } from "./protocolPrintout";
import { protocolVoting } from "./protocolVoting";
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;
@Column({ type: "date" })
date: Date;
2024-10-04 12:47:13 +02:00
2024-10-29 15:23:22 +01:00
@Column({ type: "time", nullable: true })
2024-10-04 12:47:13 +02:00
starttime: Date;
2024-10-29 15:23:22 +01:00
@Column({ type: "time", 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
}