This commit is contained in:
2025-11-23 09:46:24 +03:30
parent cc28b78596
commit f196366421
11 changed files with 456 additions and 11 deletions
@@ -0,0 +1,28 @@
import { IsNumber, IsBoolean, IsOptional, IsString, Min } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
export class CreateRestaurantShipmentMethodDto {
@ApiProperty({ example: 'shipment-method-id', description: 'Shipment method ID' })
@IsString()
shipmentMethodId!: string;
@ApiProperty({ example: 5000, description: 'Shipping price' })
@IsNumber()
@Min(0)
@Type(() => Number)
price!: number;
@ApiProperty({ example: 100000, description: 'Minimum order price for free shipping' })
@IsNumber()
@Min(0)
@Type(() => Number)
minOrderPrice!: number;
@ApiPropertyOptional({ example: true, description: 'Is this shipment method active?' })
@IsOptional()
@IsBoolean()
@Type(() => Boolean)
isActive?: boolean;
}
@@ -0,0 +1,5 @@
import { PartialType } from '@nestjs/swagger';
import { CreateRestaurantShipmentMethodDto } from './create-restaurant-shipment-method.dto';
export class UpdateRestaurantShipmentMethodDto extends PartialType(CreateRestaurantShipmentMethodDto) {}