migatation and get tab4
This commit is contained in:
parent
b9cc922edc
commit
3056dfeb2a
3 changed files with 57 additions and 46 deletions
48
src/entities/DevelopmentOther.ts
Normal file
48
src/entities/DevelopmentOther.ts
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Development } from "./Development";
|
||||
import { Province } from "./Province";
|
||||
|
||||
@Entity("developmentOther")
|
||||
export class DevelopmentOther extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หัวข้อ/ประเด็นการฝึกอบรม ศึกษาดูงาน",
|
||||
default: null,
|
||||
})
|
||||
topicAcademic: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สถานที่ฝึกอบรม ศึกษาดูงาน",
|
||||
default: null,
|
||||
})
|
||||
addressAcademic: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จังหวัด(ข้อมูลวิชาการ)",
|
||||
default: null,
|
||||
})
|
||||
provinceActualId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คีย์นอก(FK)ของตาราง development",
|
||||
default: null,
|
||||
})
|
||||
developmentId: string;
|
||||
|
||||
@ManyToOne(() => Development, (development: Development) => development.developmentOthers)
|
||||
@JoinColumn({ name: "developmentId" })
|
||||
development: Development;
|
||||
}
|
||||
|
||||
export class UpdateDevelopmentOther {
|
||||
@Column()
|
||||
topicAcademic: string | null;
|
||||
@Column()
|
||||
addressAcademic: number | null;
|
||||
@Column()
|
||||
provinceActualId: number | null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue