2026-03-11 20:42:34 +03:30
|
|
|
import { GoodPricingModel, UnitType } from '@/generated/prisma/enums'
|
2026-02-12 20:31:04 +03:30
|
|
|
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
2026-03-11 20:42:34 +03:30
|
|
|
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
2026-02-12 20:31:04 +03:30
|
|
|
|
2026-03-11 20:42:34 +03:30
|
|
|
export class CreateGuildGoodDto {
|
2026-02-12 20:31:04 +03:30
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty()
|
|
|
|
|
name: string
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty()
|
|
|
|
|
sku: string
|
|
|
|
|
|
2026-03-07 11:25:11 +03:30
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty({ required: true })
|
|
|
|
|
category_id: string
|
|
|
|
|
|
2026-03-11 20:42:34 +03:30
|
|
|
@IsEnum(UnitType)
|
|
|
|
|
@ApiProperty({ required: true, enum: UnitType })
|
|
|
|
|
unit_type: UnitType
|
2026-02-12 20:31:04 +03:30
|
|
|
|
2026-03-11 20:42:34 +03:30
|
|
|
@IsEnum(GoodPricingModel)
|
|
|
|
|
@ApiProperty({ required: true, enum: GoodPricingModel })
|
|
|
|
|
pricing_model: GoodPricingModel
|
2026-02-12 20:31:04 +03:30
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@ApiProperty({ required: false })
|
2026-03-07 11:25:11 +03:30
|
|
|
description?: string
|
2026-02-12 20:31:04 +03:30
|
|
|
}
|
|
|
|
|
|
2026-03-11 20:42:34 +03:30
|
|
|
export class UpdateGuildGoodDto extends PartialType(CreateGuildGoodDto) {}
|