Files
psp_api/src/product-variants/dto/update-product-variant.dto.ts
T

64 lines
964 B
TypeScript
Raw Normal View History

import { Type } from 'class-transformer'
import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator'
export class UpdateProductVariantDto {
@IsOptional()
@IsString()
name?: string
@IsOptional()
@IsString()
description?: string
@IsOptional()
@IsString()
sku?: string
@IsOptional()
@IsString()
barcode?: string
@IsOptional()
@IsString()
imageUrl?: string
@IsOptional()
@Type(() => Number)
@IsInt()
attachmentId?: number
@IsOptional()
@IsString()
unit?: string
@IsOptional()
@Type(() => Number)
@IsInt()
discount?: number
@IsOptional()
@Type(() => Number)
@IsInt()
quantity?: number
@IsOptional()
@Type(() => Number)
@IsInt()
alertQuantity?: number
@IsOptional()
@Type(() => Boolean)
@IsBoolean()
isActive?: boolean
@IsOptional()
@Type(() => Boolean)
@IsBoolean()
isFeatured?: boolean
@IsOptional()
@Type(() => Number)
@IsInt()
productId?: number
}