feat(server): wip tax rates service

This commit is contained in:
Ahmed Bouhuolia
2023-08-11 01:31:52 +02:00
parent 26c6ca9e36
commit 04d134806b
16 changed files with 550 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
import { ServiceError } from '@/exceptions';
import TaxRate from '@/models/TaxRate';
import { Service } from 'typedi';
@Service()
export class CommandTaxRatesValidators {
/**
*
* @param {} taxRate
*/
public validateTaxRateExistance(taxRate: TaxRate | undefined | null) {
if (!taxRate) {
throw new ServiceError(ERRORS.TAX_RATE_NOT_FOUND);
}
}
}