import {
    IsMongoId, IsArray, ArrayMinSize, ArrayMaxSize, IsOptional,
    IsNumber, Min, Max, IsString, MaxLength, IsInt,
} from 'class-validator';

export class AssignTransportDto {
    @IsMongoId() routeId: string;
    @IsArray() @ArrayMinSize(1) @ArrayMaxSize(1000) @IsMongoId({ each: true }) studentIds: string[];

    /** Which months to generate (1=Jan..12=Dec). If omitted, generates all 12. */
    @IsOptional() @IsArray() @ArrayMaxSize(12) @IsInt({ each: true }) @Min(1, { each: true }) @Max(12, { each: true }) months?: number[];

    /** Override the route's monthlyFee for these students */
    @IsOptional() @IsNumber() @Min(0) @Max(10000000) customAmount?: number;

    @IsOptional() @IsString() @MaxLength(200) pickupPoint?: string;
}
