31 lines
616 B
TypeScript
31 lines
616 B
TypeScript
|
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||
|
import { protocol } from "./protocol";
|
||
|
|
||
|
@Entity()
|
||
|
export class protocolPrintout {
|
||
|
@PrimaryGeneratedColumn("increment")
|
||
|
id: number;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
title: string;
|
||
|
|
||
|
@Column({ type: "int" })
|
||
|
iteration: number;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
filename: string;
|
||
|
|
||
|
@CreateDateColumn()
|
||
|
createdAt: Date;
|
||
|
|
||
|
@Column()
|
||
|
protocolId: number;
|
||
|
|
||
|
@ManyToOne(() => protocol, {
|
||
|
nullable: false,
|
||
|
onDelete: "CASCADE",
|
||
|
onUpdate: "RESTRICT",
|
||
|
})
|
||
|
protocol: protocol;
|
||
|
}
|