mirror of
https://github.com/n08i40k/schedule-parser-next.git
synced 2025-12-06 17:57:45 +03:00
2.0.0
Я пока перечислю - умру. Надо научиться писать changelog постепенно.
This commit is contained in:
32
src/schedule/dto/v2/v2-day.dto.ts
Normal file
32
src/schedule/dto/v2/v2-day.dto.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
IsArray,
|
||||
IsDateString,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from "class-validator";
|
||||
import { Type } from "class-transformer";
|
||||
import { V2LessonDto } from "./v2-lesson.dto";
|
||||
|
||||
export class V2DayDto {
|
||||
/**
|
||||
* День недели
|
||||
* @example Понедельник
|
||||
*/
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Дата
|
||||
* @example "2024-10-06T20:00:00.000Z"
|
||||
*/
|
||||
@IsDateString()
|
||||
date: Date;
|
||||
|
||||
/**
|
||||
* Занятия
|
||||
*/
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => V2LessonDto)
|
||||
lessons: Array<V2LessonDto>;
|
||||
}
|
||||
Reference in New Issue
Block a user