targo-backend/src/time-and-attendance/expenses/dtos/expense-create.dto.ts
2025-11-17 15:27:46 -05:00

14 lines
580 B
TypeScript

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