fix: add code in categories and subcategories
This commit is contained in:
@@ -3,4 +3,7 @@ import { IsNotEmpty, IsUUID } from 'class-validator';
|
||||
export class CreateCategoriesProductDto {
|
||||
@IsNotEmpty()
|
||||
name: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
code: string;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ export class CreateSubCategoriesProductDto extends CreateCategoriesProductDto {
|
||||
@IsNotEmpty()
|
||||
name: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
code: string;
|
||||
|
||||
@IsUUID()
|
||||
categoryId: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user