Files
mayfly-go/server/internal/sys/domain/entity/resource.go

28 lines
632 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package entity
import "mayfly-go/pkg/model"
type Resource struct {
model.Model
Pid int `json:"pid"`
Type int8 `json:"type"` // 1菜单路由2资源按钮等
Status int8 `json:"status"` // 1可用-1不可用
Code string `json:"code"`
Name string `json:"name"`
Weight int `json:"weight"`
Meta string `json:"meta"`
}
func (a *Resource) TableName() string {
return "t_sys_resource"
}
const (
ResourceStatusEnable int8 = 1 // 启用状态
ResourceStatusDisable int8 = -1 // 禁用状态
// 资源状态
ResourceTypeMenu int8 = 1
ResourceTypePermission int8 = 2
)