26 lines
524 B
TypeScript
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: number;
|
|
|
|
@PrimaryColumn()
|
|
protocolId: number;
|
|
|
|
@ManyToOne(() => member, {
|
|
nullable: false,
|
|
onDelete: "CASCADE",
|
|
onUpdate: "RESTRICT",
|
|
})
|
|
member: member;
|
|
|
|
@ManyToOne(() => protocol, {
|
|
nullable: false,
|
|
onDelete: "CASCADE",
|
|
onUpdate: "RESTRICT",
|
|
})
|
|
protocol: protocol;
|
|
}
|