add decks documentation

This commit is contained in:
2023-07-16 23:23:46 +02:00
parent 971b165be8
commit 9c13a57804
21 changed files with 239 additions and 78 deletions

View File

@@ -1,3 +1,4 @@
import { ApiHideProperty } from '@nestjs/swagger'
import { IsUUID } from 'class-validator'
import { PaginationDto } from '../../../infrastructure/common/pagination/pagination.dto'
@@ -10,15 +11,23 @@ export class GetAllDecksDto extends PaginationDto {
@IsOptionalOrEmptyString()
maxCardsCount?: string
/** Search by deck name */
@IsOptionalOrEmptyString()
name?: string
/** Filter by deck authorId */
@IsOptionalOrEmptyString()
@IsUUID(4)
authorId?: string
userId: string
@ApiHideProperty()
userId?: string
/** A string that represents the name of the field to order by and the order direction.
* The format is: "field_name-order_direction".
* Available directions: "asc" and "desc".
* @example "name-desc"
* */
@IsOrderBy()
orderBy?: string | null
}