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.
26 lines
1.5 KiB
26 lines
1.5 KiB
package model |
|
|
|
import ( |
|
"time" |
|
) |
|
|
|
// FrontendBackendRoute 前后台路由关系模型 |
|
type FrontendBackendRoute struct { |
|
ID uint `gorm:"primarykey" json:"id"` |
|
CreatedAt time.Time `json:"created_at"` |
|
UpdatedAt time.Time `json:"updated_at"` |
|
FrontendRouteID uint `gorm:"uniqueIndex:idx_frontend_backend_routes_unique" json:"frontend_route_id"` // 前台路由ID |
|
BackendRoute string `gorm:"uniqueIndex:idx_frontend_backend_routes_unique" json:"backend_route"` // 后台API路径 |
|
HTTPMethod string `json:"http_method"` // HTTP方法 |
|
AuthGroup string `json:"auth_group"` // 权限分组:Read-读取权限,Edit-编辑权限 |
|
Module string `json:"module"` // 所属模块 |
|
Description string `json:"description"` // 描述 |
|
IsDefault bool `gorm:"default:false" json:"is_default"` // 是否为默认关联 |
|
Sort int `gorm:"default:0" json:"sort"` // 排序 |
|
Status int `gorm:"default:1" json:"status"` // 状态:1-启用,0-禁用 |
|
} |
|
|
|
// TableName 指定表名 |
|
func (FrontendBackendRoute) TableName() string { |
|
return "frontend_backend_routes" |
|
}
|
|
|