forked from wangziqi/gongxue-base
fix: harden financial transaction boundaries
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import { ArrayNotEmpty, IsArray, IsIn, IsInt, IsNotEmpty, IsOptional, IsString, Matches, MaxLength } from 'class-validator';
|
||||
|
||||
export class GenerateBillsDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(/^[\w-]{8,64}$/)
|
||||
operationId?: string;
|
||||
|
||||
@IsString()
|
||||
@Matches(/^\d{4}-\d{2}$/)
|
||||
billingMonth: string;
|
||||
@@ -20,6 +25,11 @@ export class UpdateBillStatusDto {
|
||||
}
|
||||
|
||||
export class CancelBillDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(/^[\w-]{8,64}$/)
|
||||
operationId?: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@Matches(/\S/)
|
||||
|
||||
Reference in New Issue
Block a user