File

src/database/validation/case-of-success-validation.ts

Index

Properties

Properties

createdAt
Type : Date
description
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
id
Type : number
Decorators :
@ApiProperty()
logo
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
name
Type : string
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
resultOfService
Type : string
Decorators :
@ApiProperty({isArray: true, type: ResultOfServiceModel})
@IsNotEmpty({message: undefined})
service
Type : number
Decorators :
@ApiProperty()
@IsNotEmpty({message: undefined})
@IsNumber({column: 'number'})
sort
Type : number
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 { IsUnique } from 'src/validation/is-unique';
import { MessaeSendResponseIsBoolean, MessaeSendResponseIsNotEmpty } from 'src/validation/validation.exception';
import { ApiProperty } from '@nestjs/swagger/dist';
import { CustomerModel } from './customer-validation';
import { ResultOfServiceModel } from './result-of-service-validation';
import { IsNumber } from 'src/validation/is-number';

export class CaseOfSuccessValidation {



    @ApiProperty()
    id:number;

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

    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('La descripcion')})
    description:string;

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


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


    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('El nombre')})
    sort:number;

    createdAt:Date;


    @ApiProperty({isArray:true,type:ResultOfServiceModel})
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('Los resultados de los servicios')})
    resultOfService:string;


    @ApiProperty()
    @IsNotEmpty({  message: MessaeSendResponseIsNotEmpty('El Servicio')})
    @IsNumber({column:'number'})
    service:number;
}

results matching ""

    No results matching ""