mirror of
https://github.com/docmost/docmost.git
synced 2026-05-24 03:02:42 +08:00
feat(base): add DeleteRowsDto for batch row delete
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
|||||||
IsString,
|
IsString,
|
||||||
IsUUID,
|
IsUUID,
|
||||||
IsArray,
|
IsArray,
|
||||||
|
ArrayMinSize,
|
||||||
|
ArrayMaxSize,
|
||||||
ValidateNested,
|
ValidateNested,
|
||||||
} from 'class-validator';
|
} from 'class-validator';
|
||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
@@ -96,3 +98,18 @@ export class ReorderRowDto {
|
|||||||
@IsString()
|
@IsString()
|
||||||
requestId?: string;
|
requestId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class DeleteRowsDto {
|
||||||
|
@IsUUID()
|
||||||
|
baseId: string;
|
||||||
|
|
||||||
|
@IsArray()
|
||||||
|
@ArrayMinSize(1)
|
||||||
|
@ArrayMaxSize(500)
|
||||||
|
@IsUUID('all', { each: true })
|
||||||
|
rowIds: string[];
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
requestId?: string;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user