31 lines
594 B
TypeScript
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;
|
|
} |