Spaces:
Sleeping
Sleeping
| import { IsString, IsOptional, IsEnum, IsNumber, IsDateString } from 'class-validator'; | |
| import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | |
| import { Type } from 'class-transformer'; | |
| import { TaskType, TaskPriority } from '../entities/student-task.entity'; | |
| export class CreateTaskDto { | |
| ({ description: 'Task title', example: 'Complete Assignment 1' }) | |
| () | |
| title: string; | |
| ({ description: 'Task description', example: 'Finish all exercises in chapter 3' }) | |
| () | |
| () | |
| description?: string; | |
| ({ description: 'Task type', enum: TaskType, example: TaskType.ASSIGNMENT }) | |
| (TaskType) | |
| taskType: TaskType; | |
| ({ description: 'Linked assignment ID', example: 1 }) | |
| () | |
| () | |
| (() => Number) | |
| assignmentId?: number; | |
| ({ description: 'Linked quiz ID', example: 1 }) | |
| () | |
| () | |
| (() => Number) | |
| quizId?: number; | |
| ({ description: 'Linked lab ID', example: 1 }) | |
| () | |
| () | |
| (() => Number) | |
| labId?: number; | |
| ({ description: 'Due date (ISO 8601)', example: '2025-03-15T23:59:00Z' }) | |
| () | |
| () | |
| dueDate?: string; | |
| ({ description: 'Task priority', enum: TaskPriority, example: TaskPriority.MEDIUM }) | |
| () | |
| (TaskPriority) | |
| priority?: TaskPriority; | |
| } | |