วันที่เกษียณ
This commit is contained in:
parent
39e6c6e1c5
commit
27fefee8d7
3 changed files with 58 additions and 18 deletions
|
|
@ -154,7 +154,7 @@ export class Profile extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
comment: "วันที่พักราชการ",
|
comment: "วันครบเกษียณอายุ",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
dateRetire: Date;
|
dateRetire: Date;
|
||||||
|
|
@ -167,6 +167,14 @@ export class Profile extends EntityBase {
|
||||||
})
|
})
|
||||||
dateAppoint: Date;
|
dateAppoint: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "datetime",
|
||||||
|
comment: "วันที่เกษียณอายุราชการตามกฏหมาย",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
dateRetireLaw: Date;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|
@ -327,7 +335,7 @@ export class Profile extends EntityBase {
|
||||||
@OneToMany(() => ProfileFamilyMother, (v) => v.profile)
|
@OneToMany(() => ProfileFamilyMother, (v) => v.profile)
|
||||||
profileFamilyMother: ProfileFamilyMother[];
|
profileFamilyMother: ProfileFamilyMother[];
|
||||||
|
|
||||||
@OneToMany(() => ProfileFamilyCouple , (v) => v.profile)
|
@OneToMany(() => ProfileFamilyCouple, (v) => v.profile)
|
||||||
profileFamilyCouple: ProfileFamilyCouple[];
|
profileFamilyCouple: ProfileFamilyCouple[];
|
||||||
|
|
||||||
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
|
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ export class ProfileEmployee extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
comment: "วันที่พักราชการ",
|
comment: "วันครบเกษียณอายุ",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
dateRetire: Date;
|
dateRetire: Date;
|
||||||
|
|
@ -148,6 +148,14 @@ export class ProfileEmployee extends EntityBase {
|
||||||
})
|
})
|
||||||
birthDate: Date;
|
birthDate: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: "datetime",
|
||||||
|
comment: "วันที่เกษียณอายุราชการตามกฏหมาย",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
dateRetireLaw: Date;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
type: "double",
|
type: "double",
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
@ -286,7 +294,7 @@ export class ProfileEmployee extends EntityBase {
|
||||||
@OneToMany(() => ProfileFamilyMother, (v) => v.profile)
|
@OneToMany(() => ProfileFamilyMother, (v) => v.profile)
|
||||||
profileFamilyMother: ProfileFamilyMother[];
|
profileFamilyMother: ProfileFamilyMother[];
|
||||||
|
|
||||||
@OneToMany(() => ProfileFamilyCouple , (v) => v.profile)
|
@OneToMany(() => ProfileFamilyCouple, (v) => v.profile)
|
||||||
profileFamilyCouple: ProfileFamilyCouple[];
|
profileFamilyCouple: ProfileFamilyCouple[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -309,22 +317,22 @@ export class CreateProfileEmployee {
|
||||||
prefix: string;
|
prefix: string;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName: string;
|
||||||
position: string;
|
// position: string;
|
||||||
isProbation: boolean | null;
|
// isProbation: boolean | null;
|
||||||
dateRetire: Date | null;
|
// dateRetire: Date | null;
|
||||||
birthDate: Date | null;
|
birthDate: Date | null;
|
||||||
salaryLevel: number | null;
|
salaryLevel: number | null;
|
||||||
ethnicity: string | null;
|
// ethnicity: string | null;
|
||||||
telephoneNumber: string | null;
|
// telephoneNumber: string | null;
|
||||||
citizenId: string;
|
citizenId: string;
|
||||||
religion: string | null;
|
// religion: string | null;
|
||||||
posLevelId: string | null;
|
posLevelId: string | null;
|
||||||
posTypeId: string | null;
|
posTypeId: string | null;
|
||||||
gender: string | null;
|
// gender: string | null;
|
||||||
relationship: string | null;
|
// relationship: string | null;
|
||||||
bloodGroup: string | null;
|
// bloodGroup: string | null;
|
||||||
email: string | null;
|
// email: string | null;
|
||||||
phone: string | null;
|
// phone: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileEmployee = {
|
export type UpdateProfileEmployee = {
|
||||||
|
|
@ -332,9 +340,9 @@ export type UpdateProfileEmployee = {
|
||||||
prefix?: string | null;
|
prefix?: string | null;
|
||||||
firstName?: string | null;
|
firstName?: string | null;
|
||||||
lastName?: string | null;
|
lastName?: string | null;
|
||||||
position?: string | null;
|
// position?: string | null;
|
||||||
isProbation?: boolean | null;
|
// isProbation?: boolean | null;
|
||||||
dateRetire?: Date | null;
|
// dateRetire?: Date | null;
|
||||||
birthDate?: Date | null;
|
birthDate?: Date | null;
|
||||||
salaryLevel?: number | null;
|
salaryLevel?: number | null;
|
||||||
ethnicity?: string | null;
|
ethnicity?: string | null;
|
||||||
|
|
|
||||||
24
src/migration/1715683984766-add_table_dateRetire.ts
Normal file
24
src/migration/1715683984766-add_table_dateRetire.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class AddTableDateRetire1715683984766 implements MigrationInterface {
|
||||||
|
name = 'AddTableDateRetire1715683984766'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`dateRetireLaw\` datetime NULL COMMENT 'วันที่เกษียณอายุราชการตามกฏหมาย'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`dateRetireLaw\` datetime NULL COMMENT 'วันที่เกษียณอายุราชการตามกฏหมาย'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`dateRetireLaw\` datetime NULL COMMENT 'วันที่เกษียณอายุราชการตามกฏหมาย'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`dateRetireLaw\` datetime NULL COMMENT 'วันที่เกษียณอายุราชการตามกฏหมาย'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployee\` CHANGE \`dateRetire\` \`dateRetire\` datetime NULL COMMENT 'วันครบเกษียณอายุ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` CHANGE \`dateRetire\` \`dateRetire\` datetime NULL COMMENT 'วันครบเกษียณอายุ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` CHANGE \`dateRetire\` \`dateRetire\` datetime NULL COMMENT 'วันที่พักราชการ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployee\` CHANGE \`dateRetire\` \`dateRetire\` datetime NULL COMMENT 'วันที่พักราชการ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`dateRetireLaw\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`dateRetireLaw\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`dateRetireLaw\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`dateRetireLaw\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue