PhiloMind / src /courses /dto /create-node.dto.ts
github-actions[bot]
Deploy Backend from GitHub Actions Commit: c89dec07198e3d623d9f3e33a3a42f954d0970c2
98629af
Raw
History Blame Contribute Delete
882 Bytes
import {
IsBoolean,
IsString,
IsNotEmpty,
IsIn,
IsOptional,
IsNumber,
} from "class-validator";
export class CreateNodeDto {
@IsString()
@IsNotEmpty()
title: string;
@IsString()
@IsNotEmpty()
summary: string;
@IsString()
@IsNotEmpty()
originalText: string;
@IsString()
@IsNotEmpty()
quickTake: string;
@IsString()
@IsOptional()
difficulty?: string;
@IsString()
@IsOptional()
timeToRead?: string;
@IsString()
@IsOptional()
videoUrl?: string;
@IsNumber()
@IsNotEmpty()
orderIndex: number;
@IsString()
@IsNotEmpty()
chapterId: string;
@IsOptional()
lessonType?: string;
@IsOptional()
lessonFlow?: any;
@IsOptional()
lessonMedia?: any;
@IsBoolean()
@IsOptional()
contentReady?: boolean;
@IsString()
@IsIn(["draft", "published", "archived"])
@IsOptional()
lessonStatus?: string;
}