targo-backend/src/time-and-attendance/shifts/shift.dto.ts
Nic D 9143d1a79e refactor(exports): streamline and correct response from export main route, modify service logic
- Backend now receives a new filter structure that requires fewer conversions and transformations.

export controller's exportCsv route now follows NestJS conventions to send data buffers to frontend without requiring a decoupling of response handling
2026-03-18 09:24:46 -04:00

15 lines
562 B
TypeScript

import { IsBoolean, IsInt, IsOptional, IsString, MaxLength } from "class-validator";
export class ShiftDto {
@IsInt() @IsOptional() id?: number;
@IsInt() timesheet_id: number;
@IsString() type: string;
@IsString() date: string;
@IsString() start_time: string;
@IsString() end_time: string;
@IsBoolean() is_approved: boolean;
@IsBoolean() is_remote: boolean;
@IsOptional() @IsString() @MaxLength(280) comment?: string;
}
export type ShiftType = 'REGULAR' | 'EVENING' | 'EMERGENCY' | 'VACATION' | 'HOLIDAY' | 'SICK';