feat: add student wallet utility billing

This commit is contained in:
2026-07-14 20:39:32 +08:00
parent b480070e69
commit c75a08affe
29 changed files with 986 additions and 548 deletions

View File

@@ -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 {