categories to db

This commit is contained in:
2023-12-21 20:52:47 +03:00
parent 96b7e49fa2
commit ed1716232a
4 changed files with 146 additions and 72 deletions

14
gorm/category.go Normal file
View File

@ -0,0 +1,14 @@
package gorm
type Category struct {
ID int
ParentID int
Title string
Name string
FlatName string
Level int
}
func (Category) TableName() string {
return "categories"
}