import { Expose, Type } from 'class-transformer';
import { ArrayMaxSize, ArrayMinSize, IsArray, IsOptional, IsString, MaxLength, ValidateNested } from 'class-validator';
import { ShiftRotationDayVC } from './shiftRotationDayVC';

export class CreateOrUpdateShiftRotationVC {
    @IsString()
    @MaxLength(250)
    @Expose()
    name!: string;

    @IsOptional()
    @IsString()
    @MaxLength(250)
    @Expose()
    description?: string;

    @IsArray()
    @ArrayMinSize(1)
    @ArrayMaxSize(28)
    @ValidateNested({ each: true })
    @Type(() => ShiftRotationDayVC)
    @Expose()
    days!: ShiftRotationDayVC[];
}
