import { Type } from "class-transformer";
import { IsBoolean, IsInt, IsOptional, IsString, MaxLength } from "class-validator";

export class ExpenseDto {
    @IsInt() id: number;
    @IsString() type: string;
    @IsString() date: string;
    @IsBoolean() is_approved: boolean;
    @IsOptional() @Type(()=> Number) amount?: number;
    @IsOptional() @Type(()=> Number) mileage?: number;
    @IsOptional() @IsInt() attachment?: number;
    @IsOptional() @IsInt() timesheet_id?: number;
    @IsOptional() @IsString() @MaxLength(280) comment: string;
    @IsOptional() @IsString() @MaxLength(280) supervisor_comment?: string
}