34 lines
926 B
TypeScript
34 lines
926 B
TypeScript
import { Entity, Column, ManyToOne, JoinColumn, OneToOne } from "typeorm";
|
|
import { EntityBase } from "./base/Base";
|
|
import { Evaluation } from "./Evaluation";
|
|
|
|
@Entity("portfolio")
|
|
export class Portfolio extends EntityBase {
|
|
@Column({
|
|
comment: "Id การทำรายการระบบประเมิน",
|
|
length: 40,
|
|
default: "00000000-0000-0000-0000-000000000000",
|
|
})
|
|
evaluationId: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ชื่อเอกสาร/ผลงาน",
|
|
default: null,
|
|
})
|
|
name: string;
|
|
|
|
@Column({
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "รายละเอียดเอกสาร/ผลงาน",
|
|
default: null,
|
|
})
|
|
detail: string;
|
|
|
|
@ManyToOne(() => Evaluation, (Evaluation) => Evaluation.portfolios)
|
|
@JoinColumn({ name: "evaluationId" })
|
|
evaluation: Evaluation;
|
|
}
|
|
|
|
export type UpdatePortfolio = Partial<Portfolio>;
|