You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
993 B
25 lines
993 B
package model |
|
|
|
import ( |
|
"time" |
|
) |
|
|
|
// RouteMapping 路由映射模型 |
|
type RouteMapping struct { |
|
ID uint `gorm:"primarykey" json:"id"` |
|
CreatedAt time.Time `json:"created_at"` |
|
UpdatedAt time.Time `json:"updated_at"` |
|
FrontendRoute string `json:"frontend_route"` // 前台路由路径 |
|
BackendRoute string `json:"backend_route"` // 后台API路径 |
|
HTTPMethod string `json:"http_method"` // HTTP方法 |
|
AuthGroup string `json:"auth_group"` // 权限分组:Read-读取权限,Edit-编辑权限 |
|
ResourceID *uint `json:"resource_id"` // 关联的资源ID |
|
Module string `json:"module"` // 所属模块 |
|
Description string `json:"description"` // 描述 |
|
Status int `gorm:"default:1" json:"status"` // 状态:1-启用,0-禁用 |
|
} |
|
|
|
// TableName 指定表名 |
|
func (RouteMapping) TableName() string { |
|
return "route_mappings" |
|
}
|
|
|