update
This commit is contained in:
39
src/entity/hrms/hrms_faculty.ts
Normal file
39
src/entity/hrms/hrms_faculty.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../../types/status";
|
||||||
|
|
||||||
|
@Entity("hrms_faculties")
|
||||||
|
export class HrmsFaculty {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 128,
|
||||||
|
})
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
status: Status;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
55
src/entity/hrms/hrms_scholarship.ts
Normal file
55
src/entity/hrms/hrms_scholarship.ts
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../../types/status";
|
||||||
|
import { HrmsFaculty } from "./hrms_faculty";
|
||||||
|
import { HrmsEmployee } from "./hrms_employee";
|
||||||
|
|
||||||
|
@Entity("hrms_scholarships")
|
||||||
|
export class HrmsScholarship {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => HrmsFaculty, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
faculty: HrmsFaculty;
|
||||||
|
|
||||||
|
@ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
employee: HrmsEmployee;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
university: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
phone: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
file: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
status: Status;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
39
src/entity/hrms/hrms_study.ts
Normal file
39
src/entity/hrms/hrms_study.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../../types/status";
|
||||||
|
|
||||||
|
@Entity("studies")
|
||||||
|
export class HrmsStudy {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 128,
|
||||||
|
})
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
status: Status;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
51
src/entity/hrms/hrms_training.ts
Normal file
51
src/entity/hrms/hrms_training.ts
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../../types/status";
|
||||||
|
import { HrmsFaculty } from "./hrms_faculty";
|
||||||
|
import { HrmsEmployee } from "./hrms_employee";
|
||||||
|
|
||||||
|
@Entity("hrms_trainings")
|
||||||
|
export class HrmsTraining {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 4096,
|
||||||
|
})
|
||||||
|
description: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
start_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
end_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
status: Status;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
42
src/entity/hrms/hrms_training_participant.ts
Normal file
42
src/entity/hrms/hrms_training_participant.ts
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../../types/status";
|
||||||
|
import { HrmsEmployee } from "./hrms_employee";
|
||||||
|
import { HrmsDepartment } from "./hrms_department";
|
||||||
|
import { HrmsTraining } from "./hrms_training";
|
||||||
|
|
||||||
|
@Entity("hrms_training_participants")
|
||||||
|
export class HrmsTrainingParticipant {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => HrmsTraining, { onDelete: "NO ACTION", nullable: false })
|
||||||
|
@JoinColumn()
|
||||||
|
training: HrmsTraining;
|
||||||
|
|
||||||
|
@ManyToOne(() => HrmsDepartment, { onDelete: "NO ACTION", nullable: false })
|
||||||
|
@JoinColumn()
|
||||||
|
department: HrmsDepartment;
|
||||||
|
|
||||||
|
@ManyToOne(() => HrmsEmployee, { onDelete: "NO ACTION", nullable: false })
|
||||||
|
@JoinColumn()
|
||||||
|
employee: HrmsEmployee;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
status: Status;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user