fileserver/dto/src/requests/fs.ts

20 lines
361 B
TypeScript
Raw Normal View History

2022-08-25 11:39:58 +00:00
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;
}