File
description
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
id
|
Type : number
|
Decorators :
@ApiProperty()
|
|
imageBackGround
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
imageUrl
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
name
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
service
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
slug
|
Type : string
|
Decorators :
@ApiProperty() @IsUnique({tableName: 'partnership', column: 'slug'}) @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})
|
|
urlService
|
Type : string
|
Decorators :
@ApiProperty() @IsNotEmpty({message: undefined})
|
|
import { IsBoolean, IsNotEmpty } from 'class-validator';
import { IsUnique } from 'src/validation/is-unique';
import { IsNumber } from 'src/validation/is-number';
import { MessaeSendResponseIsBoolean, MessaeSendResponseIsNotEmpty } from 'src/validation/validation.exception';
import { ApiProperty } from '@nestjs/swagger/dist';
export class PartnershipValidation {
@ApiProperty()
id:number;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El nombre')})
name:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La Imagen')})
imageUrl:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La Imagen de Fondo')})
imageBackGround:string
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La descripcion')})
description:string;
@ApiProperty()
@IsUnique({tableName:'partnership',column:'slug'})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El slug')})
slug:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El servicio')})
service:string;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('La url')})
urlService:string;
@ApiProperty({type:Boolean})
@IsBoolean({message:MessaeSendResponseIsBoolean('El estado')})
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El estado')})
status:boolean;
createdAt:Date;
@ApiProperty()
@IsNotEmpty({ message: MessaeSendResponseIsNotEmpty('El Numero de Orden')})
@IsNumber({column:'sort'})
sort:number;
}