You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
425 B

import { Transform } from 'class-transformer'
import {
IsPositive,
IsAlpha,
IsString,
IsOptional,
IsNumber,
IsBoolean
} from 'class-validator'
export class CreateChannelDto {
@IsOptional()
@IsPositive()
id: number
@IsString()
name: string
@IsNumber()
owner: number
@IsOptional()
password: string
@IsBoolean()
@Transform(({ value }) => value === 'true')
isPrivate: boolean
}