22 lines
462 B
TypeScript
22 lines
462 B
TypeScript
![]() |
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from "typeorm";
|
||
|
import { Case } from "./Case";
|
||
|
|
||
|
@Entity("case_notes")
|
||
|
export class CaseNote {
|
||
|
@PrimaryGeneratedColumn() id: number;
|
||
|
|
||
|
@Column() case_id: number;
|
||
|
|
||
|
@Column() mod_id: string;
|
||
|
|
||
|
@Column() mod_name: string;
|
||
|
|
||
|
@Column() body: string;
|
||
|
|
||
|
@Column() created_at: string;
|
||
|
|
||
|
@ManyToOne(type => Case, theCase => theCase.notes)
|
||
|
@JoinColumn({ name: "case_id" })
|
||
|
case: Case;
|
||
|
}
|