Merge branch 'develop' of github.com:Frappet/bma-ehr-organization into develop
This commit is contained in:
commit
8b04567991
7 changed files with 77 additions and 27 deletions
|
|
@ -70,6 +70,7 @@ export class ProfileEducationsController extends Controller {
|
||||||
educationLevelId: "string",
|
educationLevelId: "string",
|
||||||
positionPath: "string",
|
positionPath: "string",
|
||||||
positionPathId: "string",
|
positionPathId: "string",
|
||||||
|
note: "string",
|
||||||
isDate: true,
|
isDate: true,
|
||||||
isEducation: true,
|
isEducation: true,
|
||||||
},
|
},
|
||||||
|
|
@ -113,6 +114,7 @@ export class ProfileEducationsController extends Controller {
|
||||||
educationLevelId: "string",
|
educationLevelId: "string",
|
||||||
positionPath: "string",
|
positionPath: "string",
|
||||||
positionPathId: "string",
|
positionPathId: "string",
|
||||||
|
note: "string",
|
||||||
isDate: true,
|
isDate: true,
|
||||||
isEducation: true,
|
isEducation: true,
|
||||||
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
||||||
|
|
@ -142,6 +144,7 @@ export class ProfileEducationsController extends Controller {
|
||||||
educationLevelId: "string",
|
educationLevelId: "string",
|
||||||
positionPath: "string",
|
positionPath: "string",
|
||||||
positionPathId: "string",
|
positionPathId: "string",
|
||||||
|
note: "string",
|
||||||
isDate: true,
|
isDate: true,
|
||||||
isEducation: true,
|
isEducation: true,
|
||||||
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ export class ProfileInsigniaController extends Controller {
|
||||||
volumeNo: "string",
|
volumeNo: "string",
|
||||||
refCommandDate: "2024-03-12T10:05:02.000Z",
|
refCommandDate: "2024-03-12T10:05:02.000Z",
|
||||||
refCommandNo: "string",
|
refCommandNo: "string",
|
||||||
|
note: "string",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
@ -96,6 +97,7 @@ export class ProfileInsigniaController extends Controller {
|
||||||
volumeNo: "volumeNo",
|
volumeNo: "volumeNo",
|
||||||
refCommandDate: "2024-03-12T10:05:44.000Z",
|
refCommandDate: "2024-03-12T10:05:44.000Z",
|
||||||
refCommandNo: "refCommandNo",
|
refCommandNo: "refCommandNo",
|
||||||
|
note: "string",
|
||||||
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -120,6 +122,7 @@ export class ProfileInsigniaController extends Controller {
|
||||||
volumeNo: "string",
|
volumeNo: "string",
|
||||||
refCommandDate: "2024-03-12T10:05:02.000Z",
|
refCommandDate: "2024-03-12T10:05:02.000Z",
|
||||||
refCommandNo: "string",
|
refCommandNo: "string",
|
||||||
|
note: "string",
|
||||||
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ export class ProfileEducation extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ระดับศึกษา",
|
comment: "ระดับศึกษา",
|
||||||
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
educationLevel: string;
|
educationLevel: string;
|
||||||
|
|
@ -164,14 +164,16 @@ export class ProfileEducation extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
isEducation: boolean;
|
isEducation: boolean;
|
||||||
|
|
||||||
@OneToMany(() => ProfileEducationHistory, (profileEducationHistory) => profileEducationHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileEducationHistory,
|
||||||
|
(profileEducationHistory) => profileEducationHistory.histories,
|
||||||
|
)
|
||||||
profileEducationHistories: ProfileEducationHistory[];
|
profileEducationHistories: ProfileEducationHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileEducations)
|
@ManyToOne(() => Profile, (profile) => profile.profileEducations)
|
||||||
@JoinColumn({ name: "profileId" })
|
@JoinColumn({ name: "profileId" })
|
||||||
profile: Profile;
|
profile: Profile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileEducation {
|
export class CreateProfileEducation {
|
||||||
|
|
@ -234,6 +236,9 @@ export class CreateProfileEducation {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isEducation: boolean | null;
|
isEducation: boolean | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileEducation = Partial<CreateProfileEducation>;
|
export type UpdateProfileEducation = Partial<CreateProfileEducation>;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileEducation } from "./ProfileEducation";
|
||||||
|
|
||||||
@Entity("profileEducationHistory")
|
@Entity("profileEducationHistory")
|
||||||
export class ProfileEducationHistory extends EntityBase {
|
export class ProfileEducationHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -108,7 +107,7 @@ export class ProfileEducationHistory extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ระดับศึกษา",
|
comment: "ระดับศึกษา",
|
||||||
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
educationLevel: string;
|
educationLevel: string;
|
||||||
|
|
@ -151,6 +150,13 @@ export class ProfileEducationHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
isEducation: boolean;
|
isEducation: boolean;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "หมายเหตุ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
note: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -158,15 +164,16 @@ export class ProfileEducationHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
profileEducationId: string;
|
profileEducationId: string;
|
||||||
|
|
||||||
@ManyToOne(() => ProfileEducation, (profileEducation) => profileEducation.profileEducationHistories)
|
@ManyToOne(
|
||||||
|
() => ProfileEducation,
|
||||||
|
(profileEducation) => profileEducation.profileEducationHistories,
|
||||||
|
)
|
||||||
@JoinColumn({ name: "profileEducationId" })
|
@JoinColumn({ name: "profileEducationId" })
|
||||||
histories: ProfileEducation;
|
histories: ProfileEducation;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileEducationHistory {
|
export class CreateProfileEducationHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
|
|
@ -227,6 +234,8 @@ export class CreateProfileEducationHistory {
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
profileEducationId: string | null;
|
profileEducationId: string | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileEducationHistory = Partial<CreateProfileEducationHistory>;
|
export type UpdateProfileEducationHistory = Partial<CreateProfileEducationHistory>;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export class ProfileInsignia extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
section: string;
|
section: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 30,
|
length: 30,
|
||||||
|
|
@ -63,7 +63,7 @@ export class ProfileInsignia extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
receiveDate: Date;
|
receiveDate: Date;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -71,7 +71,7 @@ export class ProfileInsignia extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
insigniaId: string;
|
insigniaId: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ประเภท",
|
comment: "ประเภท",
|
||||||
|
|
@ -127,7 +127,10 @@ export class ProfileInsignia extends EntityBase {
|
||||||
})
|
})
|
||||||
note: string;
|
note: string;
|
||||||
|
|
||||||
@OneToMany(() => ProfileInsigniaHistory, (profileInsigniaHistory) => profileInsigniaHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileInsigniaHistory,
|
||||||
|
(profileInsigniaHistory) => profileInsigniaHistory.histories,
|
||||||
|
)
|
||||||
profileInsigniaHistories: ProfileInsigniaHistory[];
|
profileInsigniaHistories: ProfileInsigniaHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileInsignias)
|
@ManyToOne(() => Profile, (profile) => profile.profileInsignias)
|
||||||
|
|
@ -141,7 +144,7 @@ export class CreateProfileInsignia {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
year: number;
|
year: number;
|
||||||
|
|
||||||
|
|
@ -153,16 +156,16 @@ export class CreateProfileInsignia {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
section: string | null;
|
section: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
page: string | null;
|
page: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
receiveDate: Date | null;
|
receiveDate: Date | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
insigniaId: string | null;
|
insigniaId: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
insigniaType: string | null;
|
insigniaType: string | null;
|
||||||
|
|
||||||
|
|
@ -180,6 +183,9 @@ export class CreateProfileInsignia {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileInsignia = Partial<CreateProfileInsignia>;
|
export type UpdateProfileInsignia = Partial<CreateProfileInsignia>;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileInsignia } from "./ProfileInsignia";
|
||||||
|
|
||||||
@Entity("profileInsigniaHistory")
|
@Entity("profileInsigniaHistory")
|
||||||
export class ProfileInsigniaHistory extends EntityBase {
|
export class ProfileInsigniaHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -40,7 +39,7 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
section: string;
|
section: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 30,
|
length: 30,
|
||||||
|
|
@ -56,7 +55,7 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
receiveDate: Date;
|
receiveDate: Date;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -64,7 +63,7 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
insigniaId: string;
|
insigniaId: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ประเภท",
|
comment: "ประเภท",
|
||||||
|
|
@ -113,6 +112,13 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
refCommandNo: string;
|
refCommandNo: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "หมายเหตุ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
note: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -127,10 +133,9 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileInsigniaHistory {
|
export class CreateProfileInsigniaHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
year: number;
|
year: number;
|
||||||
|
|
||||||
|
|
@ -142,16 +147,16 @@ export class CreateProfileInsigniaHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
section: string | null;
|
section: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
page: string | null;
|
page: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
receiveDate: Date | null;
|
receiveDate: Date | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
insigniaId: string | null;
|
insigniaId: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
insigniaType: string | null;
|
insigniaType: string | null;
|
||||||
|
|
||||||
|
|
@ -170,6 +175,9 @@ export class CreateProfileInsigniaHistory {
|
||||||
@Column()
|
@Column()
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
profileInsigniaId: string | null;
|
profileInsigniaId: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableProfileHistoryAddNote1710749867773 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableProfileHistoryAddNote1710749867773'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEducationHistory\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileInsigniaHistory\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileInsigniaHistory\` DROP COLUMN \`note\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEducationHistory\` DROP COLUMN \`note\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue