refactor🎨: 数据初始化

This commit is contained in:
wenjianzhang committed 2021-06-09 18:30:47 +08:00
1 parent 6a31ac916a
commit 54e116818b
15 files changed
+4175 -266

No files matched your search

+9 -23
View File
@@ -1,30 +1,16 @@
package models
import "go-admin/common/models"
type SysApi struct {
Id int `json:"id" gorm:"primaryKey;autoIncrement;comment:主键编码"`
Handle string `json:"handle" gorm:"type:varchar(128);comment:handle"`
Title string `json:"title" gorm:"type:varchar(128);comment:标题"`
Permission string `json:"permission" gorm:"size:255;"`
Path string `json:"path" gorm:"type:varchar(128);comment:地址"`
Paths string `json:"paths" gorm:"type:varchar(128);comment:Paths"`
Action string `json:"action" gorm:"type:varchar(16);comment:类型"`
ParentId int `json:"parentId" gorm:"comment:按钮id"`
Sort int `json:"sort" gorm:"type:tinyint(4);comment:排序"`
models.ModelTime
models.ControlBy
Id int `json:"id" gorm:"primaryKey;autoIncrement;comment:主键编码"`
Handle string `json:"handle" gorm:"size:128;comment:handle"`
Title string `json:"title" gorm:"size:128;comment:标题"`
Path string `json:"path" gorm:"size:128;comment:地址"`
Action string `json:"action" gorm:"size:16;comment:请求类型"`
Type string `json:"type" gorm:"size:16;comment:接口类型"`
ModelTime
ControlBy
}
func (SysApi) TableName() string {
return "sys_api"
}
func (e *SysApi) Generate() models.ActiveRecord {
o := *e
return &o
}
func (e *SysApi) GetId() interface{} {
return e.Id
}
}