Merge branch 'dev/methapon' into develop
This commit is contained in:
commit
863512ed2d
3 changed files with 48 additions and 15 deletions
|
|
@ -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,
|
||||||
|
|
@ -159,14 +165,15 @@ export class ProfileEducationHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
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>;
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
@ -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,7 +133,6 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileInsigniaHistory {
|
export class CreateProfileInsigniaHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
|
|
@ -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