You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
600 B
40 lines
600 B
import { IsString, IsNumber, IsOptional, IsArray, IsInt, isInt } from 'class-validator'; |
|
|
|
export class UpdateProductDto { |
|
@IsOptional() |
|
@IsString() |
|
name?: string; |
|
|
|
@IsOptional() |
|
@IsString() |
|
description?: string; |
|
|
|
@IsOptional() |
|
@IsInt() |
|
price?: number; |
|
|
|
@IsOptional() |
|
@IsString() |
|
imageUrl?: string; |
|
|
|
@IsOptional() |
|
@IsArray() |
|
@IsString({ each: true }) |
|
tags?: string[]; |
|
|
|
@IsOptional() |
|
@IsInt() |
|
quantity?: number; |
|
|
|
@IsOptional() |
|
@IsString() |
|
brand?: string; |
|
|
|
@IsOptional() |
|
@IsString() |
|
color?: string; |
|
|
|
@IsOptional() |
|
@IsString() |
|
category?: string; |
|
}
|
|
|