targo-backend/src/time-and-attendance/time-tracker/schedule-presets/dtos/create-schedule-preset-shifts.dto.ts
2025-11-13 15:30:29 -05:00

30 lines
608 B
TypeScript

import { IsBoolean, IsEnum, IsInt, IsOptional, IsString, Matches, Min } from "class-validator";
import { HH_MM_REGEX } from "src/common/utils/constants.utils";
import { Weekday } from "@prisma/client";
export class SchedulePresetShiftsDto {
@IsEnum(Weekday)
week_day!: Weekday;
@IsInt()
preset_id!: number;
@IsInt()
@Min(1)
sort_order!: number;
@IsString()
type!: string;
@IsString()
@Matches(HH_MM_REGEX)
start_time!: string;
@IsString()
@Matches(HH_MM_REGEX)
end_time!: string;
@IsOptional()
@IsBoolean()
is_remote?: boolean;
}