mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
refactor(nestjs): pdf templates
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsNumberString,
|
||||
IsOptional,
|
||||
} from 'class-validator';
|
||||
import { NumberFormatQueryDto } from './NumberFormatQuery.dto';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class GetBankTransactionsQueryDto {
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
page: number;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
pageSize: number;
|
||||
|
||||
@IsNotEmpty()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
accountId: number;
|
||||
|
||||
@IsOptional()
|
||||
numberFormat: NumberFormatQueryDto;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Type } from "class-transformer";
|
||||
import { IsBoolean, IsEnum, IsNumber, IsOptional, IsPositive } from "class-validator";
|
||||
|
||||
export class NumberFormatQueryDto {
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
@IsPositive()
|
||||
@IsOptional()
|
||||
readonly precision: number;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
readonly divideOn1000: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
readonly showZero: boolean;
|
||||
|
||||
@IsEnum(['total', 'always', 'none'])
|
||||
@IsOptional()
|
||||
readonly formatMoney: 'total' | 'always' | 'none';
|
||||
|
||||
@IsEnum(['parentheses', 'mines'])
|
||||
@IsOptional()
|
||||
readonly negativeFormat: 'parentheses' | 'mines';
|
||||
}
|
||||
Reference in New Issue
Block a user