File

src/database/validation/phrase-validation.ts

Index

Properties

Properties

createdAt
Type : Date
description
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
id
Type : number
Decorators :
@ApiProperty()
name
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
status
Type : boolean
Decorators :
@ApiProperty({type: Boolean})
@IsBoolean({message: undefined})
@IsNotEmpty({message: undefined})
import { IsBoolean, IsNotEmpty  } from 'class-validator';
import { MessaeSendResponseIsBoolean, MessaeSendResponseIsNotEmpty } from 'src/validation/validation.exception';
import { ApiProperty } from '@nestjs/swagger/dist';

export class PhraseValidation {

    @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;

    createdAt:Date;

}

results matching ""

    No results matching ""