feat✨ 分离app

This commit is contained in:
zhangwenjian committed 2021-05-08 09:35:49 +08:00
1 parent c6d94c03fb
commit 7fffcffcdd
68 files changed
+590 -478

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
package models
import (
"go-admin/common/models"
)
type SysCategory struct {
models.Model
Name string `json:"name" gorm:"size:255;comment:名称"` //
Img string `json:"img" gorm:"size:255;comment:图标"` //
Sort int `json:"sort" gorm:"size:4;comment:排序"` //
Status int `json:"status" gorm:"size:1;comment:状态"` //
Remark string `json:"remark" gorm:"size:255;comment:备注"` //
models.ControlBy
models.ModelTime
}
func (SysCategory) TableName() string {
return "sys_category"
}
func (e *SysCategory) Generate() models.ActiveRecord {
o := *e
return &o
}
func (e *SysCategory) GetId() interface{} {
return e.Id
}
+33
View File
@@ -0,0 +1,33 @@
package models
import (
"go-admin/common/models"
)
type SysContent struct {
models.Model
CateId int `json:"cateId" gorm:"type:int(11);comment:分类id"`
Name string `json:"name" gorm:"type:varchar(255);comment:名称"`
Status int `json:"status" gorm:"type:int(1);comment:状态"`
Img string `json:"img" gorm:"type:varchar(255);comment:图片"`
Content string `json:"content" gorm:"type:text;comment:内容"`
Remark string `json:"remark" gorm:"type:varchar(255);comment:备注"`
Sort int `json:"sort" gorm:"type:int(4);comment:排序"`
models.ControlBy
models.ModelTime
}
// TableName
func (SysContent) TableName() string {
return "sys_content"
}
// Generate
func (e *SysContent) Generate() models.ActiveRecord {
o := *e
return &o
}
func (e *SysContent) GetId() interface{} {
return e.Id
}