hrms-api-development/src/entities/Portfolio.ts

26 lines
563 B
TypeScript

import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
@Entity("portfolio")
export class Portfolio extends EntityBase {
@Column({
nullable: true,
comment: "ชื่อเอกสาร/ผลงาน",
default: null,
})
name: string;
@Column({
type: "longtext",
nullable: true,
comment: "รายละเอียดเอกสาร/ผลงาน",
default: null,
})
detail: string;
}
export class CreatePortfolio {
@Column()
name: string;
@Column()
detail: string | null;
}