user request data

This commit is contained in:
kittapath 2024-09-30 17:56:49 +07:00
parent 939ed6ddfd
commit d899039b9d
9 changed files with 688 additions and 6 deletions

View file

@ -1,5 +1,8 @@
import { Entity, Column } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileDevelopment } from "./ProfileDevelopment";
import { ProfileDevelopmentHistory } from "./ProfileDevelopmentHistory";
import { DevelopmentRequest } from "./DevelopmentRequest";
@Entity("developmentProject")
export class DevelopmentProject extends EntityBase {
@ -27,12 +30,40 @@ export class DevelopmentProject extends EntityBase {
})
profileDevelopmentId: string;
@ManyToOne(
() => ProfileDevelopment,
(profileDevelopment) => profileDevelopment.developmentProjects,
)
@JoinColumn({ name: "profileDevelopmentId" })
profileDevelopment: ProfileDevelopment;
@Column({
nullable: true,
comment: "โครงการ/หลักสูตรการฝึกอบรม",
default: null,
})
profileDevelopmentHistoryId: string;
@ManyToOne(
() => ProfileDevelopmentHistory,
(profileDevelopmentHistory) => profileDevelopmentHistory.developmentProjects,
)
@JoinColumn({ name: "profileDevelopmentHistoryId" })
profileDevelopmentHistory: ProfileDevelopmentHistory;
@Column({
nullable: true,
comment: "โครงการ/หลักสูตรการฝึกอบรม",
default: null,
})
developmentRequestId: string;
@ManyToOne(
() => DevelopmentRequest,
(developmentRequest) => developmentRequest.developmentProjects,
)
@JoinColumn({ name: "developmentRequestId" })
developmentRequest: DevelopmentRequest;
}
export class CreateDevelopmentProject {
@Column()