fileserver/dto/requests/fs.ts

21 lines
393 B
TypeScript

import { BaseRequest } from './base';
import { IsInt, IsNotEmpty, IsString, Min } from 'class-validator';
export class CreateFolderRequest extends BaseRequest {
@IsInt()
@Min(1)
parent: number;
@IsNotEmpty()
@IsString()
name: string;
}
export class DeleteRequest extends BaseRequest {
@IsInt()
@Min(1)
node: number;
}
export class CreateFileRequest extends CreateFolderRequest {}