3r-xidongdong-nestjs/src/modules/restful/dtos/restore.dto.ts
xidongdong-153 5bcb4853e5 feat:增加批量删除、软删除和软删除恢复
- 完成基础的软删除
- 完成树形数据的软删除(children未处理)
2023-12-15 11:19:42 +08:00

20 lines
379 B
TypeScript

import { IsDefined, IsUUID } from 'class-validator';
import { DtoValidation } from '@/modules/core/decorators';
/**
* 批量恢复验证
*/
@DtoValidation()
export class RestoreDto {
@IsUUID(undefined, {
each: true,
message: 'ID格式错误',
})
@IsDefined({
each: true,
message: 'ID必须指定',
})
ids: string[] = [];
}