From 973ac686e72dcc0c4dcb6940937d6659bf4cf6f8 Mon Sep 17 00:00:00 2001 From: ilham Date: Thu, 16 Dec 2021 19:29:44 +0700 Subject: [PATCH] fix: entity cateogires --- src/product/entities/product-category.entity.ts | 4 +++- src/product/entities/product-sub-category.entity.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/product/entities/product-category.entity.ts b/src/product/entities/product-category.entity.ts index 3da2720..873538f 100644 --- a/src/product/entities/product-category.entity.ts +++ b/src/product/entities/product-category.entity.ts @@ -19,7 +19,9 @@ export class ProductCategories extends BaseModel { @Column() name: string; - @Column() + @Column({ + nullable: true, + }) code: string; @OneToMany( diff --git a/src/product/entities/product-sub-category.entity.ts b/src/product/entities/product-sub-category.entity.ts index a5b1aad..f60eec2 100644 --- a/src/product/entities/product-sub-category.entity.ts +++ b/src/product/entities/product-sub-category.entity.ts @@ -17,7 +17,9 @@ export class ProductSubCategories extends BaseModel { @Column() name: string; - @Column() + @Column({ + nullable: true, + }) code: string; @ManyToOne(() => ProductCategories, (categories) => categories.sub_categories)