create and get categories with database for user
This commit is contained in:
1 parent
2c06975a43
commit
90e5863adc
12 files changed
+189
-79
No files matched your search
@@ -4,7 +4,7 @@ type Category struct {
|
||||
BaseModel
|
||||
Icon string `json:"icon"`
|
||||
Title string `json:"title"`
|
||||
Subcategories []Subcategory `json:"subcategories" gorm:"foreignKey:CategoryID"`
|
||||
Subcategories []Subcategory `json:"subcategories,omitempty" gorm:"foreignKey:CategoryID"`
|
||||
Type string `json:"type"`
|
||||
UserID string
|
||||
}
|
||||
Reference in new issue
Block a user