fix(typing): removed validation on ExpenseDto

This commit is contained in:
Matthieu Haineault 2025-11-17 15:05:32 -05:00
parent 99cb5da69d
commit e43cb489cf

View File

@ -1,15 +1,14 @@
import { IsBoolean, IsInt, IsOptional, IsString, MaxLength } from "class-validator"; import { IsBoolean, IsInt, IsOptional, IsString, MaxLength } from "class-validator";
export class ExpenseDto { export class ExpenseDto {
@IsInt() @IsOptional() id: number; id: number;
@IsInt() type!: string; type!: string;
@IsInt() timesheet_id!: number; timesheet_id!: number;
@IsInt() @IsOptional() attachment?: number; attachment?: number;
date!: string;
@IsString() date!: string; amount?: number;
@IsInt() @IsOptional() amount?: number; mileage?: number;
@IsInt() @IsOptional() mileage?: number; comment!: string;
@IsString() @MaxLength(280) comment!: string; is_approved!: boolean;
@IsBoolean() is_approved!: boolean; supervisor_comment?: string
@IsString() @MaxLength(280) @IsOptional() supervisor_comment?: string
} }