forked from wangziqi/gongxue-base
fix: 修复批量更新账单状态功能
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IsString, IsOptional } from 'class-validator';
|
||||
import { ArrayNotEmpty, IsArray, IsIn, IsInt, IsString } from 'class-validator';
|
||||
|
||||
export class GenerateBillsDto {
|
||||
@IsString()
|
||||
@@ -9,6 +9,13 @@ export class GenerateBillsDto {
|
||||
}
|
||||
|
||||
export class UpdateBillStatusDto {
|
||||
@IsString()
|
||||
@IsIn(['draft', 'confirmed', 'paid'])
|
||||
status: 'draft' | 'confirmed' | 'paid';
|
||||
}
|
||||
|
||||
export class BatchUpdateBillStatusDto extends UpdateBillStatusDto {
|
||||
@IsArray()
|
||||
@ArrayNotEmpty()
|
||||
@IsInt({ each: true })
|
||||
ids: number[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user