Files
schedule-parser-next/src/schedule/dto/v1/v1-group.dto.ts
n08i40k 5fe5d56ca9 2.0.0
Я пока перечислю - умру.
Надо научиться писать changelog постепенно.
2024-10-19 02:12:37 +04:00

25 lines
614 B
TypeScript

import { ApiProperty } from "@nestjs/swagger";
import { IsArray, IsOptional, IsString, ValidateNested } from "class-validator";
import { Type } from "class-transformer";
import { V1DayDto } from "./v1-day.dto";
export class V1GroupDto {
@ApiProperty({
example: "ИС-214/23",
description: "Название группы",
})
@IsString()
name: string;
@ApiProperty({ example: [], description: "Дни недели" })
@IsArray()
@ValidateNested({ each: true })
@IsOptional()
@Type(() => V1DayDto)
days: Array<V1DayDto | null>;
constructor(name: string) {
this.name = name;
this.days = [];
}
}