mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 02:04:09 +00:00
30 lines
932 B
Go
30 lines
932 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
|
|
} |