2026-02-12 20:31:04 +03:30
|
|
|
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
|
|
|
|
import { IsNumber, IsOptional, IsString } from 'class-validator'
|
|
|
|
|
|
|
|
|
|
export class CreateGoodDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty()
|
|
|
|
|
name: string
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty()
|
|
|
|
|
sku: string
|
|
|
|
|
|
2026-03-07 11:25:11 +03:30
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty({ required: true })
|
|
|
|
|
category_id: string
|
|
|
|
|
|
2026-02-12 20:31:04 +03:30
|
|
|
@IsString()
|
2026-03-07 11:25:11 +03:30
|
|
|
@IsOptional()
|
|
|
|
|
@ApiProperty({ required: false })
|
|
|
|
|
local_sku?: string
|
2026-02-12 20:31:04 +03:30
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty({ required: false })
|
|
|
|
|
barcode?: string
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty({ required: false })
|
2026-03-07 11:25:11 +03:30
|
|
|
description?: string
|
2026-02-12 20:31:04 +03:30
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsNumber()
|
|
|
|
|
@ApiProperty({ required: false })
|
|
|
|
|
base_sale_price?: number
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class UpdateGoodDto extends PartialType(CreateGoodDto) {}
|