File
|
Optional
address
|
Type : string
|
Decorators :
@Expose() @IsOptional() @IsString()
|
|
|
|
Optional
city
|
Type : string
|
Decorators :
@Expose() @IsOptional() @IsString()
|
|
|
|
companyName
|
Type : string
|
Decorators :
@Expose() @IsNotEmpty() @IsString()
|
|
|
|
Optional
country
|
Type : string
|
Decorators :
@Expose() @IsOptional() @IsString()
|
|
|
|
Optional
industry
|
Type : string | null
|
Decorators :
@Expose() @IsOptional() @IsString()
|
|
|
|
Optional
phone
|
Type : string
|
Decorators :
@Expose() @IsOptional() @IsString() @Matches(/^\+?[\d\s]+$/, {message: 'Phone number can only contain digits, spaces, and an optional plus (+) symbol for country code'})
|
|
|
|
Optional
website
|
Type : string
|
Decorators :
@Expose() @IsOptional() @IsString()
|
|
|
import { Exclude, Expose } from "class-transformer";
import { IsNotEmpty, IsOptional, IsString, Matches } from "class-validator";
@Exclude()
export class CompanyProfileDto {
@Expose()
id!: number;
@Expose()
companyName!: string;
@Expose()
industry!: string | null;
@Expose()
address!: string;
@Expose()
city!: string;
@Expose()
country!: string;
@Expose()
phone!: string;
@Expose()
website!: string;
/** Resolved IANA timezone (from company country / preferred_timezone). */
@Expose()
timezone!: string;
}
@Exclude()
export class UpdateCompanyProfileDto {
@Expose()
@IsNotEmpty()
@IsString()
companyName!: string;
@Expose()
@IsOptional()
@IsString()
industry?: string | null;
@Expose()
@IsOptional()
@IsString()
address?: string;
@Expose()
@IsOptional()
@IsString()
city?: string;
@Expose()
@IsOptional()
@IsString()
country?: string;
@Expose()
@IsOptional()
@IsString()
@Matches(/^\+?[\d\s]+$/, {
message: "Phone number can only contain digits, spaces, and an optional plus (+) symbol for country code",
})
phone?: string;
@Expose()
@IsOptional()
@IsString()
website?: string;
}