File
dateAndTime
|
Type : Date
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
description
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
imageDescription
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
imageUrl
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
modality
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
name
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
placeOrMedium
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
slug
|
Type : string
|
Decorators :
@ApiProperty() @IsUnique({tableName: 'event', column: 'slug'}) @IsNotEmpty({message: undefined})
|
|
status
|
Type : boolean
|
Decorators :
@ApiProperty({type: Boolean}) @IsBoolean({message: undefined}) @IsNotEmpty({message: undefined})
|
|
url
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
user
|
Type : number
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined}) @IsNumber({column: 'number'})
|
|
import { IsBoolean, IsNotEmpty } from 'class-validator';
import { IsUnique } from 'src/validation/is-unique';
import { MessaeSendResponseIsBoolean, MessaeSendResponseIsNotEmpty } from 'src/validation/validation.exception';
import { ApiProperty } from '@nestjs/swagger/dist';
import { IsNumber } from 'src/validation/is-number';
export class EventValidation {
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El nombre')})
name:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La descripcion')})
description:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La Fecha del evento')})
dateAndTime:Date;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La Descripcion de la imagen')})
imageDescription:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El Lugar del evento')})
placeOrMedium:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La modalidad del evento')})
modality:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La URL del evento')})
url:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La imagen del evento')})
imageUrl:string;
@ApiProperty()
@IsUnique({tableName:'event',column:'slug'})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El slug')})
slug:string;
@ApiProperty({type:Boolean})
@IsBoolean({message:MessaeSendResponseIsBoolean('El estado')})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El estado')})
status:boolean;
createdAt:Date;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El Expositor')})
@IsNumber({column:'number'})
user:number;
}