23 lines
629 B
TypeScript
23 lines
629 B
TypeScript
|
|
import { IsString, IsOptional, IsArray, IsUrl } from 'class-validator';
|
||
|
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||
|
|
|
||
|
|
export class CreateTrainingMaterialDto {
|
||
|
|
@ApiProperty({ description: 'Training material title' })
|
||
|
|
@IsString()
|
||
|
|
title: string;
|
||
|
|
|
||
|
|
@ApiProperty({ description: 'Training material description' })
|
||
|
|
@IsString()
|
||
|
|
description: string;
|
||
|
|
|
||
|
|
@ApiProperty({ description: 'Training material file URL' })
|
||
|
|
@IsUrl()
|
||
|
|
fileUrl: string;
|
||
|
|
|
||
|
|
@ApiPropertyOptional({ description: 'Training material tags', type: [String] })
|
||
|
|
@IsArray()
|
||
|
|
@IsString({ each: true })
|
||
|
|
@IsOptional()
|
||
|
|
tags?: string[];
|
||
|
|
}
|