Files
psp_api/src/modules/pos/goods/dto/create-good.dto.ts
T

39 lines
726 B
TypeScript
Raw Normal View History

import { ApiProperty, PartialType } from '@nestjs/swagger'
import { IsNumber, IsOptional, IsString } from 'class-validator'
export class CreateGoodDto {
@IsString()
@ApiProperty()
name: string
@IsOptional()
@IsString()
@ApiProperty({ required: false })
description?: string
@IsString()
@ApiProperty()
sku: string
@IsString()
@ApiProperty()
local_sku: string
@IsOptional()
@IsString()
@ApiProperty({ required: false })
barcode?: string
@IsOptional()
@IsString()
@ApiProperty({ required: false })
category_id?: string
@IsOptional()
@IsNumber()
@ApiProperty({ required: false })
base_sale_price?: number
}
export class UpdateGoodDto extends PartialType(CreateGoodDto) {}