import { IsString, IsIn, IsOptional, MaxLength, IsNumber, Min } from 'class-validator';

export class RecordPaymentDto {
    @IsNumber() @Min(1)
    amount: number;

    @IsString() @IsIn(['cash', 'cheque', 'bank_transfer', 'upi', 'online'])
    paymentMethod: 'cash' | 'cheque' | 'bank_transfer' | 'upi' | 'online';

    @IsOptional() @IsString() @MaxLength(200) transactionId?: string;

    @IsOptional() @IsString() @MaxLength(1000) notes?: string;
}
