46 lines
1.6 KiB
Go
46 lines
1.6 KiB
Go
package platform
|
|
|
|
import (
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
|
)
|
|
|
|
// AdPlatformAccount 广告平台账户配置实体(上游广告平台对接凭据)
|
|
type AdPlatformAccount struct {
|
|
beans.SQLBaseDO `orm:",inherit"`
|
|
// 业务字段
|
|
Platform string `orm:"platform" json:"platform" description:"广告平台 douyin/xiaohongshu/kuaishou"`
|
|
AccountID string `orm:"account_id" json:"accountId" description:"平台侧账户ID"`
|
|
AppID string `orm:"app_id" json:"appId" description:"应用ID"`
|
|
AppSecret string `orm:"app_secret" json:"appSecret" description:"应用密钥"`
|
|
AccessToken string `orm:"access_token" json:"accessToken" description:"访问令牌"`
|
|
TokenExpireAt int64 `orm:"token_expire_at" json:"tokenExpireAt" description:"令牌过期时间戳"`
|
|
Config string `orm:"config" json:"config" description:"平台特定配置(JSON)"`
|
|
Enabled bool `orm:"enabled" json:"enabled" description:"是否启用"`
|
|
}
|
|
|
|
// AdPlatformAccountCol 广告平台账户表字段定义
|
|
type AdPlatformAccountCol struct {
|
|
beans.SQLBaseCol
|
|
Platform string
|
|
AccountID string
|
|
AppID string
|
|
AppSecret string
|
|
AccessToken string
|
|
TokenExpireAt string
|
|
Config string
|
|
Enabled string
|
|
}
|
|
|
|
// AdPlatformAccountCols 广告平台账户表字段常量
|
|
var AdPlatformAccountCols = AdPlatformAccountCol{
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|
Platform: "platform",
|
|
AccountID: "account_id",
|
|
AppID: "app_id",
|
|
AppSecret: "app_secret",
|
|
AccessToken: "access_token",
|
|
TokenExpireAt: "token_expire_at",
|
|
Config: "config",
|
|
Enabled: "enabled",
|
|
}
|