Files
cid/model/entity/app/application.go
2026-03-23 14:08:11 +08:00

50 lines
1.7 KiB
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 app
import (
consts "cid/consts/app"
"gitea.com/red-future/common/beans"
)
// Application 应用管理实体
type Application struct {
beans.SQLBaseDO `orm:",inherit"`
// 基础信息
Name string `orm:"name" json:"name" description:"应用名称"`
AppCode string `orm:"app_code" json:"appCode" description:"应用编码(唯一标识)"`
Type consts.AppType `orm:"type" json:"type" description:"应用类型"`
Status consts.AppStatus `orm:"status" json:"status" description:"应用状态active启用/inactive停用"`
Description string `orm:"description" json:"description" description:"应用描述"`
// 接入配置 (JSONB)
AccessConfig map[string]interface{} `orm:"access_config" json:"accessConfig" description:"接入配置"`
// 限流配置 (JSONB)
LimitConfig map[string]interface{} `orm:"limit_config" json:"limitConfig" description:"限流配置"`
// 回调配置 (JSONB)
CallbackConfig map[string]interface{} `orm:"callback_config" json:"callbackConfig" description:"回调配置"`
}
// ApplicationCol 应用表字段定义
type ApplicationCol struct {
beans.SQLBaseCol
Name string
AppCode string
Type string
Status string
Description string
AccessConfig string
LimitConfig string
CallbackConfig string
}
// ApplicationCols 应用表字段常量
var ApplicationCols = ApplicationCol{
SQLBaseCol: beans.DefSQLBaseCol,
Name: "name",
AppCode: "app_code",
Type: "type",
Status: "status",
Description: "description",
AccessConfig: "access_config",
LimitConfig: "limit_config",
CallbackConfig: "callback_config",
}