add cards documentation

This commit is contained in:
2023-07-16 23:34:35 +02:00
parent 9c13a57804
commit 111ca55cbf
5 changed files with 61 additions and 9 deletions

View File

@@ -1,5 +1,33 @@
import { PartialType } from '@nestjs/mapped-types'
import { ApiProperty } from '@nestjs/swagger'
import { IsOptional, Length } from 'class-validator'
import { CreateCardDto } from './create-card.dto'
export class UpdateCardDto extends PartialType(CreateCardDto) {}
export class UpdateCardDto extends PartialType(CreateCardDto) {
@IsOptional()
@Length(3, 500)
question?: string
@IsOptional()
@Length(3, 500)
answer?: string
@IsOptional()
@Length(0, 0)
@ApiProperty({ type: 'string', format: 'binary' })
questionImg?: string
@IsOptional()
@Length(0, 0)
@ApiProperty({ type: 'string', format: 'binary' })
answerImg?: string
@IsOptional()
@Length(3, 500)
questionVideo?: string
@IsOptional()
@Length(3, 500)
answerVideo?: string
}