Files
backend/src/customers/dto/update-customer.dto.ts
T
Alireza HassaniandCursor 7277817b6e Add store-item Excel export/import for bulk price and stock updates.
Dashboard can download grouped product variants and re-upload to update price and stock. Also expose Content-Disposition for downloads and keep related product/customer API docs in sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 01:02:43 +03:30

50 lines
838 B
TypeScript

import {
IsBoolean,
IsOptional,
IsString,
MaxLength,
MinLength,
ValidateIf,
} from 'class-validator';
export class UpdateCustomerDto {
@IsOptional()
@IsBoolean()
isEnabled?: boolean;
@IsOptional()
@IsString()
@MinLength(1)
@MaxLength(100)
firstName?: string;
@IsOptional()
@IsString()
@MinLength(1)
@MaxLength(100)
lastName?: string;
@IsOptional()
@IsString()
@ValidateIf((_, value) => typeof value === 'string' && value.trim().length > 0)
@MinLength(2)
@MaxLength(100)
firstNameEn?: string;
@IsOptional()
@IsString()
@ValidateIf((_, value) => typeof value === 'string' && value.trim().length > 0)
@MinLength(2)
@MaxLength(100)
lastNameEn?: string;
@IsOptional()
@IsString()
email?: string;
@IsOptional()
@IsString()
@MinLength(10)
cellNumber?: string;
}