add year assessments

This commit is contained in:
kittapath 2025-02-04 11:53:18 +07:00
parent e208b1ef1b
commit 7bf4310063
2 changed files with 23 additions and 0 deletions

View file

@ -38,6 +38,12 @@ export class ProfileAssessment extends EntityBase {
})
period: string;
@Column({
comment: "ปีการประเมิน",
nullable: true,
})
year: string;
@Column({
nullable: true,
type: "datetime",
@ -113,6 +119,7 @@ export class CreateProfileAssessment {
profileId: string | null;
name: string | null;
period: string | null;
year: number | null;
date: Date | null;
point1: number | null;
point1Total: number | null;
@ -126,6 +133,7 @@ export class CreateProfileEmployeeAssessment {
profileEmployeeId: string | null;
name: string | null;
period: string | null;
year: number | null;
date: Date | null;
point1: number | null;
point1Total: number | null;
@ -138,6 +146,7 @@ export class CreateProfileEmployeeAssessment {
export type UpdateProfileAssessment = {
name?: string | null;
period?: string | null;
year?: number | null;
date?: Date | null;
point1?: number | null;
point1Total?: number | null;

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfileAssessmentAddYear1738644573688 implements MigrationInterface {
name = 'UpdateProfileAssessmentAddYear1738644573688'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileAssessment\` ADD \`year\` varchar(255) NULL COMMENT 'ปีการประเมิน'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileAssessment\` DROP COLUMN \`year\``);
}
}