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