updating
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { GoodPricingModel, UnitType } from '@/generated/prisma/enums'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsNumber, IsOptional, IsString } from 'class-validator'
|
||||
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
|
||||
|
||||
export class CreateGoodDto {
|
||||
@IsString()
|
||||
@@ -19,6 +20,14 @@ export class CreateGoodDto {
|
||||
@ApiProperty()
|
||||
local_sku: string
|
||||
|
||||
@IsEnum(UnitType)
|
||||
@ApiProperty({ required: true, enum: UnitType })
|
||||
unit_type: UnitType
|
||||
|
||||
@IsEnum(GoodPricingModel)
|
||||
@ApiProperty({ required: true, enum: GoodPricingModel })
|
||||
pricing_model: GoodPricingModel
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
|
||||
Reference in New Issue
Block a user