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

View file

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