2022-08-25 11:39:58 +00:00
|
|
|
import { BaseRequest } from './base';
|
2022-08-25 13:13:44 +00:00
|
|
|
import { IsInt, IsNotEmpty, IsString, Min } from 'class-validator';
|
2022-08-25 11:39:58 +00:00
|
|
|
|
|
|
|
export class CreateFolderRequest extends BaseRequest {
|
|
|
|
@IsInt()
|
|
|
|
@Min(1)
|
|
|
|
parent: number;
|
|
|
|
|
|
|
|
@IsNotEmpty()
|
2022-08-25 13:13:44 +00:00
|
|
|
@IsString()
|
2022-08-25 11:39:58 +00:00
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class DeleteRequest extends BaseRequest {
|
|
|
|
@IsInt()
|
|
|
|
@Min(1)
|
|
|
|
node: number;
|
|
|
|
}
|
2022-08-25 13:13:44 +00:00
|
|
|
|
|
|
|
export class CreateFileRequest extends CreateFolderRequest {}
|