44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
|
import { EntityBase } from "./base/Base";
|
|
import { Development } from "./Development";
|
|
|
|
@Entity("developmentAddress")
|
|
export class DevelopmentAddress extends EntityBase {
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ที่อยู่",
|
|
default: null,
|
|
})
|
|
address: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "โครงการ/หลักสูตรการฝึกอบรม",
|
|
default: null,
|
|
})
|
|
provinceId: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "โครงการ/หลักสูตรการฝึกอบรม",
|
|
default: null,
|
|
})
|
|
provinceName: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "โครงการ/หลักสูตรการฝึกอบรม",
|
|
default: null,
|
|
})
|
|
developmentId: string;
|
|
|
|
@ManyToOne(() => Development, (development: Development) => development.developmentAddresss)
|
|
@JoinColumn({ name: "developmentId" })
|
|
development: Development;
|
|
}
|
|
export class CreateDevelopmentAddress {
|
|
@Column()
|
|
address: string | null;
|
|
@Column()
|
|
provinceId: string | null;
|
|
}
|