crud profile discip,duty,nopaid,other
This commit is contained in:
parent
1d48bb06ee
commit
13fc7945e5
9 changed files with 706 additions and 5 deletions
|
|
@ -13,7 +13,7 @@ import { ProfileHonor } from "./ProfileHonor";
|
|||
import { ProfileAssessment } from "./ProfileAssessment";
|
||||
import { ProfileLeave } from "./ProfileLeave";
|
||||
import { ProfileAbility } from "./ProfileAbility";
|
||||
import { ProfileDuty } from "./ProfileDutys";
|
||||
import { ProfileDuty } from "./ProfileDuty";
|
||||
import { ProfileNopaid } from "./ProfileNopaid";
|
||||
import { ProfileOther } from "./ProfileOther";
|
||||
|
||||
|
|
|
|||
|
|
@ -73,3 +73,32 @@ export class ProfileDiscipline extends EntityBase {
|
|||
@JoinColumn({ name: "profileId" })
|
||||
profile: Profile;
|
||||
}
|
||||
|
||||
export class CreateProfileDiscipline {
|
||||
|
||||
@Column()
|
||||
date: Date | null;
|
||||
|
||||
@Column()
|
||||
profileId: string;
|
||||
|
||||
@Column()
|
||||
isActive: boolean | null;
|
||||
|
||||
@Column()
|
||||
level: string | null;
|
||||
|
||||
@Column()
|
||||
detail: string | null;
|
||||
|
||||
@Column()
|
||||
refCommandDate: Date | null;
|
||||
|
||||
@Column()
|
||||
refCommandNo: string | null;
|
||||
|
||||
@Column()
|
||||
unStigma: string | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileDiscipline = Partial<CreateProfileDiscipline>;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Profile } from "./Profile";
|
||||
import { ProfileDuty } from "./ProfileDutys";
|
||||
import { ProfileDuty } from "./ProfileDuty";
|
||||
|
||||
@Entity("profileDutyHistory")
|
||||
export class ProfileDutyHistory extends EntityBase {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export class ProfileOtherHistory extends EntityBase {
|
|||
comment: "คีย์นอก(FK)ของตาราง Profile",
|
||||
default: null,
|
||||
})
|
||||
profileId: string;
|
||||
profileOtherId: string;
|
||||
|
||||
@Column({
|
||||
comment: "สถานะการใช้งาน",
|
||||
|
|
@ -35,13 +35,13 @@ export class ProfileOtherHistory extends EntityBase {
|
|||
date: Date;
|
||||
|
||||
@ManyToOne(() => ProfileOther, (profileOther) => profileOther.profileOtherHistories)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
@JoinColumn({ name: "profileOtherId" })
|
||||
histories: ProfileOther;
|
||||
}
|
||||
|
||||
export class CreateProfileOtherHistory {
|
||||
@Column("uuid")
|
||||
profileId: string | null;
|
||||
profileOtherId: string | null;
|
||||
|
||||
@Column()
|
||||
isActive: boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue