ประเภทประการเกียรติ
This commit is contained in:
parent
45c7a179c5
commit
087098f8b2
4 changed files with 37 additions and 1 deletions
|
|
@ -146,7 +146,8 @@ export class InsigniaTypeController extends Controller {
|
|||
const insigniaType_Active = await this.insigniaTypeRepository.find({
|
||||
select: ["id", "name", "createdAt", "lastUpdatedAt", "lastUpdateFullName", "isActive"],
|
||||
where: { isActive: true },
|
||||
order: { name: "ASC" },
|
||||
order: { name: "ASC", insignias: { level: "ASC" } },
|
||||
relations: ["insignias"],
|
||||
});
|
||||
return new HttpSuccess(insigniaType_Active);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,14 @@ export class ProfileHonor extends EntityBase {
|
|||
})
|
||||
issuer: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 200,
|
||||
comment: "ประเภท",
|
||||
default: null,
|
||||
})
|
||||
type: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
|
|
@ -88,6 +96,7 @@ export class CreateProfileHonor {
|
|||
issuer: string | null;
|
||||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
type: string | null;
|
||||
isDate: boolean | null;
|
||||
}
|
||||
|
||||
|
|
@ -98,6 +107,7 @@ export class CreateProfileEmployeeHonor {
|
|||
issuer: string | null;
|
||||
refCommandDate: Date | null;
|
||||
refCommandNo: string | null;
|
||||
type: string | null;
|
||||
isDate: boolean | null;
|
||||
}
|
||||
|
||||
|
|
@ -107,5 +117,6 @@ export type UpdateProfileHonor = {
|
|||
issuer?: string | null;
|
||||
refCommandDate?: Date | null;
|
||||
refCommandNo?: string | null;
|
||||
type?: string | null;
|
||||
isDate: boolean | null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,6 +28,14 @@ export class ProfileHonorHistory extends EntityBase {
|
|||
})
|
||||
issuer: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 200,
|
||||
comment: "ประเภท",
|
||||
default: null,
|
||||
})
|
||||
type: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
|
|
|
|||
16
src/migration/1738042376574-UpdateprofileHonoraddtype.ts
Normal file
16
src/migration/1738042376574-UpdateprofileHonoraddtype.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateprofileHonoraddtype1738042376574 implements MigrationInterface {
|
||||
name = 'UpdateprofileHonoraddtype1738042376574'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` ADD \`type\` varchar(200) NULL COMMENT 'ประเภท'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHonor\` ADD \`type\` varchar(200) NULL COMMENT 'ประเภท'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHonor\` DROP COLUMN \`type\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` DROP COLUMN \`type\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue