ff-admin-server/src/entity/protocolDecision.ts

22 lines
484 B
TypeScript
Raw Normal View History

2024-10-10 12:44:41 +00:00
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
import { protocol } from "./protocol";
@Entity()
2024-10-11 12:44:09 +00:00
export class protocolDecision {
2024-10-10 12:44:41 +00:00
@PrimaryGeneratedColumn("increment")
2024-10-11 12:44:09 +00:00
id: number;
2024-10-10 12:44:41 +00:00
@Column({ type: "varchar", length: 255 })
topic: string;
@Column({ type: "varchar", length: 255, default: "" })
context: string;
@ManyToOne(() => protocol, {
nullable: false,
onDelete: "CASCADE",
onUpdate: "RESTRICT",
})
protocol: protocol;
}