47 lines
1.5 KiB
Go
47 lines
1.5 KiB
Go
package data
|
||
|
||
import (
|
||
consts "cid/consts/data"
|
||
"gitea.com/red-future/common/beans"
|
||
)
|
||
|
||
// Platform 平台管理实体
|
||
type Platform struct {
|
||
beans.SQLBaseDO `orm:",inherit"`
|
||
// 基础信息
|
||
Name string `orm:"name" json:"name" description:"平台名称"`
|
||
Type consts.SyncPlatform `orm:"type" json:"type" description:"平台类型"`
|
||
Status consts.PlatformStatus `orm:"status" json:"status" description:"平台状态:active启用/inactive停用"`
|
||
Description string `orm:"description" json:"description" description:"平台描述"`
|
||
// 认证配置 (JSONB)
|
||
AuthConfig map[string]interface{} `orm:"auth_config" json:"authConfig" description:"认证配置"`
|
||
// 限流配置 (JSONB)
|
||
LimitConfig map[string]interface{} `orm:"limit_config" json:"limitConfig" description:"限流配置"`
|
||
// 平台专用配置 (JSONB)
|
||
PlatformConfig map[string]interface{} `orm:"platform_config" json:"platformConfig" description:"平台专用配置"`
|
||
}
|
||
|
||
// PlatformCol 平台表字段定义
|
||
type PlatformCol struct {
|
||
beans.SQLBaseCol
|
||
Name string
|
||
Type string
|
||
Status string
|
||
Description string
|
||
AuthConfig string
|
||
LimitConfig string
|
||
PlatformConfig string
|
||
}
|
||
|
||
// PlatformCols 平台表字段常量
|
||
var PlatformCols = PlatformCol{
|
||
SQLBaseCol: beans.DefSQLBaseCol,
|
||
Name: "name",
|
||
Type: "type",
|
||
Status: "status",
|
||
Description: "description",
|
||
AuthConfig: "auth_config",
|
||
LimitConfig: "limit_config",
|
||
PlatformConfig: "platform_config",
|
||
}
|