import { Expose } from 'class-transformer';
import { IsArray, IsHexColor, IsOptional, IsString, MaxLength } from 'class-validator';
import { IsValidTimeSlotTuples } from '../../validators/isValidTimeSlotTuples/isValidTimeSlotTuples';

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

    @IsString()
    @IsHexColor()
    @Expose()
    @IsOptional()
    color?: string;

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

    @IsOptional()
    @IsArray()
    @IsValidTimeSlotTuples({ message: 'Each timeSlot must be a [start, end] in HH:mm format' })
    @Expose()
    timeSlots!: [string, string][];
}
