Merge branch 'dev/methapon' into develop
This commit is contained in:
commit
9b0a5e9194
5 changed files with 43 additions and 7 deletions
|
|
@ -77,6 +77,7 @@ export class ProfileHonorController extends Controller {
|
|||
issuer: "issuer",
|
||||
refCommandDate: "2024-03-12T10:10:31.000Z",
|
||||
refCommandNo: "refCommandNo",
|
||||
isDate: true,
|
||||
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
|
||||
},
|
||||
{
|
||||
|
|
@ -93,6 +94,7 @@ export class ProfileHonorController extends Controller {
|
|||
issuer: "string",
|
||||
refCommandDate: "2024-03-12T10:09:47.000Z",
|
||||
refCommandNo: "string",
|
||||
isDate: true,
|
||||
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ export class ProfileTrainingController extends Controller {
|
|||
duration: "string",
|
||||
name: "string",
|
||||
yearly: 0,
|
||||
isDate: true,
|
||||
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
|
||||
},
|
||||
{
|
||||
|
|
@ -112,6 +113,7 @@ export class ProfileTrainingController extends Controller {
|
|||
duration: "string",
|
||||
name: "name",
|
||||
yearly: 0,
|
||||
isDate: true,
|
||||
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { ProfileHonor } from "./ProfileHonor";
|
|||
|
||||
@Entity("profileHonorHistory")
|
||||
export class ProfileHonorHistory extends EntityBase {
|
||||
|
||||
@Column({
|
||||
comment: "สถานะการใช้งาน",
|
||||
default: false,
|
||||
|
|
@ -60,13 +59,19 @@ export class ProfileHonorHistory extends EntityBase {
|
|||
})
|
||||
profileHonorId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทช่วงเวลาการศึกษา",
|
||||
default: null,
|
||||
})
|
||||
isDate: boolean;
|
||||
|
||||
@ManyToOne(() => ProfileHonor, (profileHonor) => profileHonor.profileHonorHistories)
|
||||
@JoinColumn({ name: "profileHonorId" })
|
||||
histories: ProfileHonor;
|
||||
}
|
||||
|
||||
export class CreateProfileHonorHistory {
|
||||
|
||||
@Column()
|
||||
isActive: boolean;
|
||||
|
||||
|
|
@ -80,11 +85,14 @@ export class CreateProfileHonorHistory {
|
|||
issuer: string | null;
|
||||
|
||||
@Column()
|
||||
refCommandDate: Date | null;
|
||||
refCommandDate: Date | null;
|
||||
|
||||
@Column()
|
||||
refCommandNo: string | null;
|
||||
|
||||
@Column()
|
||||
isDate: boolean | null;
|
||||
|
||||
@Column("uuid")
|
||||
profileHonorId: string | null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { ProfileTraining } from "./ProfileTraining";
|
|||
|
||||
@Entity("profileTrainingHistory")
|
||||
export class ProfileTrainingHistory extends EntityBase {
|
||||
|
||||
@Column({
|
||||
comment: "สถานะการใช้งาน",
|
||||
default: false,
|
||||
|
|
@ -98,14 +97,20 @@ export class ProfileTrainingHistory extends EntityBase {
|
|||
default: null,
|
||||
})
|
||||
profileTrainingId: string;
|
||||
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ประเภทช่วงเวลาการศึกษา",
|
||||
default: null,
|
||||
})
|
||||
isDate: boolean;
|
||||
|
||||
@ManyToOne(() => ProfileTraining, (profileTraining) => profileTraining.profileTrainingHistories)
|
||||
@JoinColumn({ name: "profileTrainingId" })
|
||||
histories: ProfileTraining;
|
||||
}
|
||||
|
||||
export class CreateProfileTrainingHistory {
|
||||
|
||||
@Column()
|
||||
isActive: boolean;
|
||||
|
||||
|
|
@ -116,7 +121,7 @@ export class CreateProfileTrainingHistory {
|
|||
endDate: Date | null;
|
||||
|
||||
@Column()
|
||||
numberOrder: string | null;
|
||||
numberOrder: string | null;
|
||||
|
||||
@Column()
|
||||
topic: string | null;
|
||||
|
|
@ -139,6 +144,9 @@ export class CreateProfileTrainingHistory {
|
|||
@Column()
|
||||
yearly: number | null;
|
||||
|
||||
@Column()
|
||||
isDate: boolean | null;
|
||||
|
||||
@Column("uuid")
|
||||
profileTrainingId: string | null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableProfileHistoryAddIsDate1710752446531 implements MigrationInterface {
|
||||
name = 'UpdateTableProfileHistoryAddIsDate1710752446531'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` ADD \`isDate\` tinyint NULL COMMENT 'ประเภทช่วงเวลาการศึกษา'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileTrainingHistory\` ADD \`isDate\` tinyint NULL COMMENT 'ประเภทช่วงเวลาการศึกษา'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileTrainingHistory\` DROP COLUMN \`isDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` DROP COLUMN \`isDate\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue