dvbooking/server/src/calendar/dto/create-exception.dto.ts
2025-11-20 22:08:17 +01:00

31 lines
594 B
TypeScript

import { IsDate, IsNotEmpty, IsOptional, IsString, IsBoolean } from 'class-validator';
import { Type } from 'class-transformer';
export class CreateExceptionDto {
@IsNotEmpty()
@IsDate()
@Type(() => Date)
originalStartTime: Date; // The start time of the instance to modify/cancel
@IsOptional()
@IsBoolean()
isCancelled?: boolean;
@IsOptional()
@IsDate()
@Type(() => Date)
newStartTime?: Date;
@IsOptional()
@IsDate()
@Type(() => Date)
newEndTime?: Date;
@IsOptional()
@IsString()
title?: string;
@IsOptional()
@IsString()
description?: string;
}