- 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
15 lines
562 B
TypeScript
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'; |