forked from wangziqi/gongxue-base
feat: link deposits to bill payment
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
import { ArrayNotEmpty, IsArray, IsIn, IsInt, IsString } from 'class-validator';
|
||||
import { ArrayNotEmpty, IsArray, IsIn, IsInt, IsOptional, IsString, Matches } from 'class-validator';
|
||||
|
||||
export class GenerateBillsDto {
|
||||
@IsString()
|
||||
periodStart: string; // YYYY-MM-DD
|
||||
@Matches(/^\d{4}-\d{2}$/)
|
||||
billingMonth: string; // YYYY-MM
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
periodEnd: string; // YYYY-MM-DD
|
||||
periodStart?: string; // deprecated, derived from billingMonth
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
periodEnd?: string; // deprecated, derived from billingMonth
|
||||
}
|
||||
|
||||
export class UpdateBillStatusDto {
|
||||
@IsIn(['draft', 'confirmed', 'paid'])
|
||||
status: 'draft' | 'confirmed' | 'paid';
|
||||
@IsIn(['paid'])
|
||||
status: 'paid';
|
||||
}
|
||||
|
||||
export class BatchUpdateBillStatusDto extends UpdateBillStatusDto {
|
||||
|
||||
Reference in New Issue
Block a user