From 997b038761b8dd606e4041d8c8dc8bbf6f036033 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 11 Oct 2025 21:06:36 +0530 Subject: Removed Brand and added BrandName and Category as item fields --- item/item.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'item/item.go') diff --git a/item/item.go b/item/item.go index 617a662..3a6235f 100644 --- a/item/item.go +++ b/item/item.go @@ -26,16 +26,13 @@ var db *gorm.DB func init() { db = d.DB - db.AutoMigrate(&SavedItem{}, &Brand{}) -} - -type Brand struct { - gorm.Model - Name string + db.AutoMigrate(&SavedItem{}) } type Item struct { Name string + BrandName string + Category string Description string HSN string UnitOfMeasure string @@ -46,6 +43,4 @@ type Item struct { type SavedItem struct { gorm.Model Item - BrandID uint - Brand Brand } -- cgit v1.2.3