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.
 
 
 
 
 
 

22 lines
746 B

package model
import (
"time"
)
// RouteMapping 路由映射模型
type RouteMapping struct {
ID uint `gorm:"primarykey" json:"id"`
UpdatedAt time.Time `json:"updated_at"`
BackendRoute string `json:"backend_route"` // 后台API路径
HTTPMethod string `json:"http_method"` // HTTP方法
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"
}