Files
go-admin/cmd/migrate/migration/models/sys_api.go
T
2021-05-31 18:10:23 +08:00

31 lines
933 B
Go

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
}
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
}