forked from wangziqi/gongxue-base
feat: add student wallet utility billing
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
import { ArrayNotEmpty, IsArray, IsIn, IsInt, IsOptional, IsString, Matches } from 'class-validator';
|
||||
import { ArrayNotEmpty, IsArray, IsIn, IsInt, IsOptional, IsString, Matches, MaxLength } from 'class-validator';
|
||||
|
||||
export class GenerateBillsDto {
|
||||
@IsString()
|
||||
@Matches(/^\d{4}-\d{2}$/)
|
||||
billingMonth: string; // YYYY-MM
|
||||
billingMonth: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
periodStart?: string; // deprecated, derived from billingMonth
|
||||
periodStart?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
periodEnd?: string; // deprecated, derived from billingMonth
|
||||
periodEnd?: string;
|
||||
}
|
||||
|
||||
export class UpdateBillStatusDto {
|
||||
@IsIn(['paid'])
|
||||
status: 'paid';
|
||||
@IsIn(['unpaid', 'partially_paid', 'paid'])
|
||||
status: 'unpaid' | 'partially_paid' | 'paid';
|
||||
}
|
||||
|
||||
export class CancelBillDto {
|
||||
@IsString()
|
||||
@MaxLength(300)
|
||||
reason: string;
|
||||
}
|
||||
|
||||
export class BatchUpdateBillStatusDto extends UpdateBillStatusDto {
|
||||
|
||||
Reference in New Issue
Block a user