20 lines
361 B
TypeScript
20 lines
361 B
TypeScript
import { BaseRequest } from './base';
|
|
import { IsInt, IsNotEmpty, Min } from 'class-validator';
|
|
|
|
export type CreateFileRequest = CreateFolderRequest;
|
|
|
|
export class CreateFolderRequest extends BaseRequest {
|
|
@IsInt()
|
|
@Min(1)
|
|
parent: number;
|
|
|
|
@IsNotEmpty()
|
|
name: string;
|
|
}
|
|
|
|
export class DeleteRequest extends BaseRequest {
|
|
@IsInt()
|
|
@Min(1)
|
|
node: number;
|
|
}
|