Spaces:
Runtime error
Runtime error
| import { IsString, IsOptional, MaxLength, IsPhoneNumber } from 'class-validator'; | |
| import { ApiProperty } from '@nestjs/swagger'; | |
| import { BaseDto } from '../base.dto'; | |
| export class CustomerDto extends BaseDto { | |
| ({ | |
| description: 'Unique identifier for the customer', | |
| example: 'C1234', | |
| }) | |
| () | |
| (5) | |
| CustomerID: string; | |
| ({ | |
| description: 'Name of the company', | |
| example: 'Tech Solutions Inc.', | |
| }) | |
| () | |
| (40) | |
| CompanyName: string; | |
| ({ | |
| description: 'Name of the contact person', | |
| example: 'John Doe', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (30) | |
| ContactName: string; | |
| ({ | |
| description: 'Title of the contact person', | |
| example: 'Manager', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (30) | |
| ContactTitle: string; | |
| ({ | |
| description: 'Address of the company', | |
| example: '123 Tech Lane, Silicon Valley, CA', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (60) | |
| Address: string; | |
| ({ | |
| description: 'City where the company is located', | |
| example: 'San Francisco', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (15) | |
| City: string; | |
| ({ | |
| description: 'Region or state where the company is located', | |
| example: 'CA', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (15) | |
| Region: string; | |
| ({ | |
| description: 'Postal code of the company', | |
| example: '94107', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (10) | |
| PostalCode: string; | |
| ({ | |
| description: 'Country where the company is located', | |
| example: 'USA', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (15) | |
| Country: string; | |
| ({ | |
| description: 'Phone number of the contact person', | |
| example: '+1 555-1234', | |
| required: false, | |
| }) | |
| () | |
| //@IsPhoneNumber('US') | |
| (24) | |
| Phone: string; | |
| ({ | |
| description: 'Fax number of the contact person', | |
| example: '+1 555-5678', | |
| required: false, | |
| }) | |
| () | |
| //@IsPhoneNumber('US') | |
| (24) | |
| Fax: string; | |
| ({ | |
| description: 'Address of the company', | |
| example: '123 Tech Lane, Silicon Valley, CA', | |
| required: false, | |
| }) | |
| () | |
| () | |
| (60) | |
| PhotoURL: string; | |
| } | |