add: product price
This commit is contained in:
@@ -13,6 +13,9 @@ export class CreateProductDto {
|
||||
@IsNotEmpty()
|
||||
price: number;
|
||||
|
||||
@IsNotEmpty()
|
||||
markUpPrice: number;
|
||||
|
||||
@IsUUID()
|
||||
subCategoriesId: string;
|
||||
}
|
||||
|
||||
17
src/product/dto/product/update-price-product.dto.ts
Normal file
17
src/product/dto/product/update-price-product.dto.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { IsNotEmpty } from 'class-validator';
|
||||
import { productType } from '../../../helper/enum-list';
|
||||
|
||||
export class UpdatePriceProductDto {
|
||||
@IsNotEmpty()
|
||||
price: number;
|
||||
|
||||
@IsNotEmpty()
|
||||
markUpPrice: number;
|
||||
|
||||
@IsNotEmpty()
|
||||
type: productType;
|
||||
|
||||
startDate: Date;
|
||||
|
||||
endDate: Date;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { OmitType, PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateProductDto } from './create-product.dto';
|
||||
|
||||
export class UpdateProductDto extends PartialType(CreateProductDto) {}
|
||||
export class UpdateProductDto extends PartialType(
|
||||
OmitType(CreateProductDto, ['price'] as const),
|
||||
) {}
|
||||
|
||||
Reference in New Issue
Block a user