ff-admin-server/src/entity/protocolPresence.ts
2024-10-10 14:44:41 +02:00

26 lines
524 B
TypeScript

import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { protocol } from "./protocol";
import { member } from "./member";
@Entity()
export class protocolPresence {
@PrimaryColumn()
memberId: string;
@PrimaryColumn()
protocolId: string;
@ManyToOne(() => member, {
nullable: false,
onDelete: "CASCADE",
onUpdate: "RESTRICT",
})
member: member;
@ManyToOne(() => protocol, {
nullable: false,
onDelete: "CASCADE",
onUpdate: "RESTRICT",
})
protocol: protocol;
}