23 lines
368 B
TypeScript
23 lines
368 B
TypeScript
import { IsInt, IsString, IsOptional, IsEnum } from 'class-validator';
|
|
|
|
export enum RegistrationType {
|
|
INDIVIDUAL = 'individual',
|
|
TEAM = 'team',
|
|
}
|
|
|
|
export class CreateRegistrationDto {
|
|
@IsInt()
|
|
contestId: number;
|
|
|
|
@IsEnum(RegistrationType)
|
|
registrationType: RegistrationType;
|
|
|
|
@IsInt()
|
|
@IsOptional()
|
|
teamId?: number;
|
|
|
|
@IsInt()
|
|
userId: number;
|
|
}
|
|
|