saas隔离使用admin-go中的租户体系
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
type AdAccount struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"归属广告主ID"`
|
||||
Name string `orm:"name" json:"name" description:"账户显示名"`
|
||||
Platform string `orm:"platform" json:"platform" description:"广告平台 douyin/xiaohongshu/kuaishou"`
|
||||
AccountID string `orm:"account_id" json:"accountId" description:"平台侧账户ID"`
|
||||
@@ -26,7 +25,6 @@ type AdAccount struct {
|
||||
// AdAccountCol 广告账户表字段定义
|
||||
type AdAccountCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
Name string
|
||||
Platform string
|
||||
AccountID string
|
||||
@@ -44,7 +42,6 @@ type AdAccountCol struct {
|
||||
// AdAccountCols 广告账户表字段常量
|
||||
var AdAccountCols = AdAccountCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
Name: "name",
|
||||
Platform: "platform",
|
||||
AccountID: "account_id",
|
||||
|
||||
@@ -8,38 +8,35 @@ import (
|
||||
type CommercePlatformConfig struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"归属广告主ID"`
|
||||
Name string `orm:"name" json:"name" description:"配置显示名"`
|
||||
Platform string `orm:"platform" json:"platform" description:"电商平台 jd/taobao"`
|
||||
AppKey string `orm:"app_key" json:"appKey" description:"应用Key"`
|
||||
AppSecret string `orm:"app_secret" json:"appSecret" description:"应用密钥"`
|
||||
CallbackURL string `orm:"callback_url" json:"callbackUrl" description:"订单回调接收URL"`
|
||||
Config string `orm:"config" json:"config" description:"平台特定配置(JSON)"`
|
||||
Enabled bool `orm:"enabled" json:"enabled" description:"是否启用"`
|
||||
Name string `orm:"name" json:"name" description:"配置显示名"`
|
||||
Platform string `orm:"platform" json:"platform" description:"电商平台 jd/taobao"`
|
||||
AppKey string `orm:"app_key" json:"appKey" description:"应用Key"`
|
||||
AppSecret string `orm:"app_secret" json:"appSecret" description:"应用密钥"`
|
||||
CallbackURL string `orm:"callback_url" json:"callbackUrl" description:"订单回调接收URL"`
|
||||
Config string `orm:"config" json:"config" description:"平台特定配置(JSON)"`
|
||||
Enabled bool `orm:"enabled" json:"enabled" description:"是否启用"`
|
||||
}
|
||||
|
||||
// CommercePlatformConfigCol 电商平台配置表字段定义
|
||||
type CommercePlatformConfigCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
Name string
|
||||
Platform string
|
||||
AppKey string
|
||||
AppSecret string
|
||||
CallbackURL string
|
||||
Config string
|
||||
Enabled string
|
||||
Name string
|
||||
Platform string
|
||||
AppKey string
|
||||
AppSecret string
|
||||
CallbackURL string
|
||||
Config string
|
||||
Enabled string
|
||||
}
|
||||
|
||||
// CommercePlatformConfigCols 电商平台配置表字段常量
|
||||
var CommercePlatformConfigCols = CommercePlatformConfigCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
Name: "name",
|
||||
Platform: "platform",
|
||||
AppKey: "app_key",
|
||||
AppSecret: "app_secret",
|
||||
CallbackURL: "callback_url",
|
||||
Config: "config",
|
||||
Enabled: "enabled",
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
Name: "name",
|
||||
Platform: "platform",
|
||||
AppKey: "app_key",
|
||||
AppSecret: "app_secret",
|
||||
CallbackURL: "callback_url",
|
||||
Config: "config",
|
||||
Enabled: "enabled",
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
type ItemMapping struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"归属广告主ID"`
|
||||
AdPlatform string `orm:"ad_platform" json:"adPlatform" description:"广告平台"`
|
||||
AdItemID string `orm:"ad_item_id" json:"adItemId" description:"广告平台侧商品ID"`
|
||||
CommercePlatform string `orm:"commerce_platform" json:"commercePlatform" description:"电商平台"`
|
||||
@@ -20,7 +19,6 @@ type ItemMapping struct {
|
||||
// ItemMappingCol 商品映射表字段定义
|
||||
type ItemMappingCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
AdPlatform string
|
||||
AdItemID string
|
||||
CommercePlatform string
|
||||
@@ -32,7 +30,6 @@ type ItemMappingCol struct {
|
||||
// ItemMappingCols 商品映射表字段常量
|
||||
var ItemMappingCols = ItemMappingCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
AdPlatform: "ad_platform",
|
||||
AdItemID: "ad_item_id",
|
||||
CommercePlatform: "commerce_platform",
|
||||
|
||||
Reference in New Issue
Block a user