File
customer
|
Type : string
|
Decorators :
@ApiProperty({isArray: true, type: CustomerModel}) @IsNotEmpty({message: undefined})
|
|
demo
|
Type : string
|
Decorators :
@ApiProperty()
|
|
description
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
graphDescription
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
graphImage
|
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})
|
|
slug
|
Type : string
|
Decorators :
@ApiProperty() @IsUnique({tableName: 'services', column: 'slug'}) @IsNotEmpty({message: undefined})
|
|
sort
|
Type : number
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
status
|
Type : boolean
|
Decorators :
@ApiProperty({type: Boolean}) @IsBoolean({message: undefined}) @IsNotEmpty({message: undefined})
|
|
subtitle
|
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 { CustomerModel } from './customer-validation';
export class ServiceValidation {
@ApiProperty()
id:number;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El nombre')})
name:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El subtitulo')})
subtitle:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La descripcion')})
description:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La imagen')})
imageUrl:string;
@ApiProperty()
demo:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La descripcion de la imagen')})
imageDescription:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El imagen para open graph')})
graphImage:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El descripcion de la imagen de open graph')})
graphDescription:string;
@ApiProperty({type:Boolean})
@IsBoolean({message:MessaeSendResponseIsBoolean('El estado')})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El estado')})
status:boolean;
@ApiProperty()
@IsUnique({tableName:'services',column:'slug'})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El slug')})
slug:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El nombre')})
sort:number;
createdAt:Date;
@ApiProperty({
isArray: true,
type: CustomerModel
})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El cliente')})
customer: string;
}