This commit is contained in:
fro1991
2026-01-01 17:03:18 +07:00
parent 0fb3b2225e
commit beb05f0e7c

View File

@ -1,70 +1,86 @@
import { import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
DeleteDateColumn,
} from "typeorm";
import { Status } from "../../types/status"; import { Status } from "../../types/status";
@Entity("hrms_shifts", { schema: "hrms" }) @Entity("hrms_shifts", { schema: "hrms" })
export class HrmsShift { export class HrmsShift {
@PrimaryGeneratedColumn("uuid")
id: string;
@PrimaryGeneratedColumn("uuid") @Column({
id: string; length: 128,
nullable: false,
})
name: string;
@Column({ @Column({
length: 128, type: "time",
nullable: false, nullable: false,
}) })
name: string; in_start_time: string; // HH:mm:ss
@Column({ @Column({
type: "time", type: "time",
nullable: false, nullable: false,
}) })
in_start_time: string; // HH:mm:ss in_end_time: string;
@Column({ @Column({
type: "time", type: "time",
nullable: false, nullable: true,
}) })
in_end_time: string; break_out_start_time: string; // HH:mm:ss
@Column({ @Column({
type: "time", type: "time",
nullable: false, nullable: true,
}) })
out_start_time: string; break_out_end_time: string;
@Column({ @Column({
type: "time", type: "time",
nullable: false, nullable: true,
}) })
out_end_time: string; break_in_start_time: string; // HH:mm:ss
@Column({ @Column({
length: 64, type: "time",
nullable: false, nullable: true,
}) })
status: Status; break_in_end_time: string;
@CreateDateColumn() @Column({
created_at: Date; type: "time",
nullable: false,
})
out_start_time: string;
@Column({ nullable: true, length: 256 }) @Column({
created_by: string; type: "time",
nullable: false,
})
out_end_time: string;
@UpdateDateColumn({ nullable: true }) @Column({
updated_at: Date; length: 64,
nullable: false,
})
status: Status;
@Column({ nullable: true, length: 256 }) @CreateDateColumn()
updated_by: string; created_at: Date;
@DeleteDateColumn({ nullable: true }) @Column({ nullable: true, length: 256 })
deleted_at: Date; created_by: string;
@Column({ nullable: true, length: 256 }) @UpdateDateColumn({ nullable: true })
deleted_by: string; 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;
} }