refactor(nestjs): landed cost

This commit is contained in:
Ahmed Bouhuolia
2025-06-11 14:04:37 +02:00
parent 1130975efd
commit ff93168d72
28 changed files with 622 additions and 417 deletions

View File

@@ -10,8 +10,9 @@ import {
} from 'class-validator';
import { Type } from 'class-transformer';
import { ToNumber } from '@/common/decorators/Validators';
import { LandedCostTransactionType } from '../types/BillLandedCosts.types';
class AllocateBillLandedCostItemDto {
export class AllocateBillLandedCostItemDto {
@IsInt()
@ToNumber()
entryId: number;
@@ -26,7 +27,7 @@ export class AllocateBillLandedCostDto {
transactionId: number;
@IsIn(['Expense', 'Bill'])
transactionType: string;
transactionType: LandedCostTransactionType;
@IsInt()
transactionEntryId: number;

View File

@@ -0,0 +1,14 @@
import { IsDateString, IsEnum, IsIn, IsNotEmpty, IsOptional, IsString } from "class-validator";
import { LandedCostTransactionType } from "../types/BillLandedCosts.types";
export class LandedCostTransactionsQueryDto {
@IsString()
@IsNotEmpty()
@IsIn(['Expense', 'Bill'])
transactionType: LandedCostTransactionType;
@IsDateString()
@IsOptional()
date: string;
}