no message

This commit is contained in:
kittapath 2024-10-02 14:08:40 +07:00
parent 2af2f32cf7
commit 8a29a37455
3 changed files with 43 additions and 18 deletions

View file

@ -276,7 +276,10 @@ export class CommandController extends Controller {
.map((x) => ({
id: x.id,
citizenId: x.citizenId,
fullName: x.fullName,
prefix: x.prefix,
firstName: x.firstName,
lastName: x.lastName,
// profileId: x.profileId,
order: x.order,
remarkVertical: x.remarkVertical,
remarkHorizontal: x.remarkHorizontal,
@ -989,7 +992,9 @@ export class CommandController extends Controller {
persons: {
refId: string;
citizenId: string;
fullName: string;
prefix: string;
firstName: string;
lastName: string;
}[];
},
@Request() request: RequestWithUser,

View file

@ -14,27 +14,27 @@ export class CommandRecive extends EntityBase {
@Column({
nullable: true,
comment: "ชื่อ-สกุล",
comment: "คำนำหน้า",
length: 255,
default: null,
})
fullName: string;
prefix: string;
// @Column({
// nullable: true,
// comment: "ชื่อ",
// length: 255,
// default: null,
// })
// firstName: string;
@Column({
nullable: true,
comment: "ชื่อ",
length: 255,
default: null,
})
firstName: string;
// @Column({
// nullable: true,
// comment: "สกุล",
// length: 255,
// default: null,
// })
// lastName: string;
@Column({
nullable: true,
comment: "สกุล",
length: 255,
default: null,
})
lastName: string;
@Column({
nullable: true,

View file

@ -0,0 +1,20 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfileDevelopment31727852313568 implements MigrationInterface {
name = 'UpdateProfileDevelopment31727852313568'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`fullName\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`prefix\` varchar(255) NULL COMMENT 'คำนำหน้า'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`firstName\` varchar(255) NULL COMMENT 'ชื่อ'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`lastName\` varchar(255) NULL COMMENT 'สกุล'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`lastName\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`firstName\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`prefix\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`fullName\` varchar(255) NULL COMMENT 'ชื่อ-สกุล'`);
}
}