Spaces:
Sleeping
Sleeping
| import { | |
| IsString, | |
| IsNotEmpty, | |
| MinLength, | |
| MaxLength, | |
| IsOptional, | |
| IsNumber, | |
| } from 'class-validator'; | |
| import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | |
| export class CreateFolderDto { | |
| ({ | |
| description: 'Folder name', | |
| example: 'Lecture Notes', | |
| minLength: 1, | |
| maxLength: 255, | |
| }) | |
| () | |
| ({ message: 'Folder name is required' }) | |
| (1, { message: 'Folder name must be at least 1 character' }) | |
| (255, { message: 'Folder name cannot exceed 255 characters' }) | |
| folderName: string; | |
| ({ description: 'Parent folder ID (null for root)', example: 1 }) | |
| () | |
| () | |
| parentFolderId?: number; | |
| ({ description: 'Course ID to associate folder with', example: 1 }) | |
| () | |
| () | |
| courseId?: number; | |
| ({ description: 'Owner user ID (defaults to current user)' }) | |
| () | |
| () | |
| userId?: number; | |
| } | |