omnichannel-backend/src/modules/contacts/dto/contact.dto.ts

44 lines
744 B
TypeScript
Raw Normal View History

import { Type } from 'class-transformer';
import { IsEmail, IsInt, IsOptional, IsString, MaxLength } from 'class-validator';
export class SaveContactDto {
@IsOptional()
@IsString()
@MaxLength(80)
phone?: string | null;
@IsOptional()
@IsString()
@MaxLength(80)
whatsappPhone?: string | null;
@IsOptional()
@IsString()
@MaxLength(80)
callSmsPhone?: string | null;
@IsOptional()
@IsEmail()
@MaxLength(255)
email?: string | null;
@IsOptional()
@IsString()
@MaxLength(255)
name?: string | null;
@IsOptional()
@IsString()
@MaxLength(255)
company?: string | null;
@IsOptional()
@IsString()
note?: string | null;
@IsOptional()
@Type(() => Number)
@IsInt()
userId?: number | null;
}