diff --git a/apps/fushouxian-server/config/dbconfig.json b/apps/fushouxian-server/config/dbconfig.json index 5524858..fcc97a9 100644 --- a/apps/fushouxian-server/config/dbconfig.json +++ b/apps/fushouxian-server/config/dbconfig.json @@ -1,10 +1,10 @@ [ { - "DbType":"mssql", + "DbType":"mysql", "IsMaster":true, - "Dsn":"server=172.0.0.8;user id=sa;password=Password1!;database=DIGITAL", + "Dsn":"server=127.0.0.1;user id=root;password=root;database=fushouxian", "sqlMaxIdleConns":1, "sqlMaxOpenConns":1, "sqlLogLevel":2 } -] \ No newline at end of file +] diff --git a/module/category/Category.go b/module/category/Category.go index 79661ad..5d26945 100644 --- a/module/category/Category.go +++ b/module/category/Category.go @@ -1 +1,21 @@ package category + +import ( + "gitlab.fanhaninfo.net/go/togo/dao/basedboperat" +) + +func (Category) TableName() string { + return "category" +} + +type Category struct { + Id int64 `json:"id"` + Type int64 `json:"type"` + Name string `json:"name"` + ParentId int64 `json:"parent_id"` + Children []Category `json:"children" xorm:"-"` +} + +func (c *Category) AfterQuery(session basedboperat.DbTransactionSession) { + +} diff --git a/module/category/init.go b/module/category/init.go index e09a92c..79661ad 100644 --- a/module/category/init.go +++ b/module/category/init.go @@ -1,12 +1 @@ package category - -func (Category) TableName() string { - return "category" -} - -type Category struct { - Id int64 `json:"id"` - FormTemplateId int64 `json:"form_template_id"` - DataId int64 `json:"data_id"` - Data string `json:"data"` -}