payroll, users
This commit is contained in:
57
src/entity/hrms/hrms_bank.ts
Normal file
57
src/entity/hrms/hrms_bank.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
||||
import { Status } from "../../types/status";
|
||||
|
||||
@Entity("hrms_banks", { schema: "hrms" })
|
||||
export class HrmsBank {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 64
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 128
|
||||
})
|
||||
name: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
unique: false,
|
||||
length: 256
|
||||
})
|
||||
description: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
created_by: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
updated_by: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
deleted_by: string;
|
||||
}
|
||||
|
||||
67
src/entity/hrms/hrms_payroll.ts
Normal file
67
src/entity/hrms/hrms_payroll.ts
Normal file
@ -0,0 +1,67 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryGeneratedColumn,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
} from "typeorm";
|
||||
import { Status } from "../../types/status";
|
||||
import { HrmsEmployee } from "./hrms_employee";
|
||||
import { HrmsBank } from "./hrms_bank";
|
||||
|
||||
@Entity("hrms_payroll", { schema: "hrms" })
|
||||
export class HrmsPayroll {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@ManyToOne(() => HrmsEmployee, { onDelete: "RESTRICT", nullable: false })
|
||||
@JoinColumn({ name: "employee_id" })
|
||||
employee: HrmsEmployee;
|
||||
|
||||
@ManyToOne(() => HrmsBank, { onDelete: "RESTRICT", nullable: false })
|
||||
@JoinColumn({ name: "bank_id" })
|
||||
bank: HrmsBank;
|
||||
|
||||
@Column({ length: 128, nullable: false })
|
||||
account_number: string;
|
||||
|
||||
@Column({ length: 128, nullable: false })
|
||||
account_name: string;
|
||||
|
||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false })
|
||||
basic_salary: number;
|
||||
|
||||
@Column({ type: "decimal", precision: 15, scale: 2, nullable: false, default: 0 })
|
||||
subsidy: number;
|
||||
|
||||
@Column({ type: "decimal", precision: 5, scale: 2, nullable: false, default: 4.0 })
|
||||
niss_percentage: number;
|
||||
|
||||
@Column({ type: "decimal", precision: 5, scale: 2, nullable: false, default: 10.0 })
|
||||
tax_percentage: number;
|
||||
|
||||
@Column({ length: 64 })
|
||||
status: Status;
|
||||
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
created_by: string;
|
||||
|
||||
@UpdateDateColumn({ nullable: true })
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
updated_by: string;
|
||||
|
||||
@DeleteDateColumn({ nullable: true })
|
||||
deleted_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
deleted_by: string;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ export class User {
|
||||
unique: false,
|
||||
length: 64
|
||||
})
|
||||
nik: string;
|
||||
employee_id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
|
||||
@ -10,5 +10,7 @@ export * from "../entity/hrms/hrms_faculty";
|
||||
export * from "../entity/hrms/hrms_study";
|
||||
export * from "../entity/hrms/hrms_training";
|
||||
export * from "../entity/hrms/hrms_training_participant";
|
||||
export * from "../entity/hrms/hrms_bank";
|
||||
export * from "../entity/hrms/hrms_payroll";
|
||||
|
||||
export * from "../types/hrms";
|
||||
|
||||
Reference in New Issue
Block a user