File
description
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
id
|
Type : number
|
Decorators :
@ApiProperty()
|
|
imageDescription
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
imageUrl
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
name
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
sort
|
Type : number
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined}) @IsNumber({column: 'sort'})
|
|
status
|
Type : boolean
|
Decorators :
@ApiProperty({type: Boolean}) @IsBoolean({message: undefined}) @IsNotEmpty({message: undefined})
|
|
type
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined}) @IsEnum(StatusEnumTable, {message: 'El tipo puede ser Plantilla / E-book'})
|
|
url
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
import { IsBoolean, IsEnum, IsNotEmpty } from 'class-validator';
import { MessaeSendResponseIsBoolean, MessaeSendResponseIsNotEmpty, StatusEnumTable } from 'src/validation/validation.exception';
import { IsNumber } from 'src/validation/is-number';
import { ApiProperty } from '@nestjs/swagger/dist';
export class ResourcesValidation {
@ApiProperty()
id:number;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El nombre')})
name:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La descripcion')})
description:string;
@ApiProperty({type:Boolean})
@IsBoolean({message:MessaeSendResponseIsBoolean('El estado')})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El estado')})
status:boolean;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La imagen')})
imageUrl:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La descripcion de la imagen')})
imageDescription:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La url')})
url:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El tipo')})
@IsEnum(StatusEnumTable,{message:"El tipo puede ser Plantilla / E-book"})
type:string;
createdAt:Date;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El Numero de Orden')})
@IsNumber({column:'sort'})
sort:number;
}