aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/item/item.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-11 21:06:36 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-11 21:06:36 +0530
commit997b038761b8dd606e4041d8c8dc8bbf6f036033 (patch)
tree156bab13e8c2566e67df43189a612b7cebccda14 /item/item.go
parent99aee928a64649be75c4698b8e856e3ea05bc695 (diff)
Removed Brand and added BrandName and Category as item fieldsv0.18.0
Diffstat (limited to 'item/item.go')
-rw-r--r--item/item.go11
1 files changed, 3 insertions, 8 deletions
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
}