targo-backend/src/time-and-attendance/expenses/expense-create.dto.ts

14 lines
575 B
TypeScript

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() timesheet_id?: number;
@IsOptional() @IsString() @MaxLength(280) comment: string;
@IsOptional() @IsString() @MaxLength(280) supervisor_comment?: string
}