fix: add code in categories and subcategories

This commit is contained in:
ilham
2021-12-16 19:04:38 +07:00
parent e82ab2c3e1
commit 0f801483a3
6 changed files with 63 additions and 0 deletions

View File

@@ -19,6 +19,9 @@ export class ProductCategories extends BaseModel {
@Column()
name: string;
@Column()
code: string;
@OneToMany(
() => ProductSubCategories,
(subCategories) => subCategories.category,

View File

@@ -17,6 +17,9 @@ export class ProductSubCategories extends BaseModel {
@Column()
name: string;
@Column()
code: string;
@ManyToOne(() => ProductCategories, (categories) => categories.sub_categories)
category: ProductCategories;