20 lines
412 B
TypeScript
20 lines
412 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsString, IsEnum } from 'class-validator';
|
|
|
|
export class CreateLeagueInputDTO {
|
|
@ApiProperty()
|
|
@IsString()
|
|
name!: string;
|
|
|
|
@ApiProperty()
|
|
@IsString()
|
|
description!: string;
|
|
|
|
@ApiProperty({ enum: ['public', 'private'] })
|
|
@IsEnum(['public', 'private'])
|
|
visibility!: 'public' | 'private';
|
|
|
|
@ApiProperty()
|
|
@IsString()
|
|
ownerId!: string;
|
|
} |