File

src/database/validation/testimonial-validation.ts

Index

Properties

Properties

id
Type : number
Decorators :
@ApiProperty()
imageUrl
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
name
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
personResponsible
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})
testimony
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
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 TestimoialValidation {
    @ApiProperty()
    id:number;

    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('El nombre')})
    name:string;

    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('El testumonio')})
    testimony:string;


    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('El responsable')})
    personResponsible:string; 

    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('La imagen del testimonio')})
    imageUrl:string;

    @ApiProperty({type:Boolean})
    @IsBoolean({message:MessaeSendResponseIsBoolean('El estado')})
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('El estado')})
    status:boolean;

    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('El Mumero de Orden')})
    @IsNumber({column:'sort'})
    sort:number;


}

results matching ""

    No results matching ""