2025-12-06 15:24:30 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2026-02-24 16:24:47 +08:00
|
|
|
|
"gitea.com/red-future/common/beans"
|
2025-12-06 15:24:30 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
2025-12-18 17:51:33 +08:00
|
|
|
|
const ApplicationCollection = "application"
|
|
|
|
|
|
|
2025-12-06 15:24:30 +08:00
|
|
|
|
// Application 应用实体
|
|
|
|
|
|
type Application struct {
|
2025-12-31 11:04:55 +08:00
|
|
|
|
beans.MongoBaseDO `bson:",inline" json:",inline"`
|
|
|
|
|
|
Status string `bson:"status" json:"status"` // 状态:active、inactive、maintenance等
|
2025-12-19 09:42:39 +08:00
|
|
|
|
|
|
|
|
|
|
// 应用基本信息
|
|
|
|
|
|
Name string `bson:"name" json:"name"` // 应用名称
|
|
|
|
|
|
Code string `bson:"code" json:"code"` // 应用编码
|
|
|
|
|
|
Description string `bson:"description" json:"description"` // 应用描述
|
|
|
|
|
|
AppKey string `bson:"appKey" json:"appKey"` // 应用密钥
|
|
|
|
|
|
AppSecret string `bson:"appSecret" json:"appSecret"` // 应用秘钥
|
|
|
|
|
|
Platform string `bson:"platform" json:"platform"` // 平台:web、ios、android、h5
|
|
|
|
|
|
Version string `bson:"version" json:"version"` // 版本号
|
|
|
|
|
|
PackageName string `bson:"packageName" json:"packageName"` // 包名(移动应用)
|
|
|
|
|
|
BundleID string `bson:"bundleId" json:"bundleId"` // Bundle ID(iOS应用)
|
|
|
|
|
|
AppStoreURL string `bson:"appStoreUrl" json:"appStoreUrl"` // 应用商店URL
|
|
|
|
|
|
|
|
|
|
|
|
// 应用配置
|
|
|
|
|
|
Config string `bson:"config" json:"config"` // 应用配置(JSON字符串)
|
|
|
|
|
|
Permissions string `bson:"permissions" json:"permissions"` // 权限配置(JSON字符串)
|
|
|
|
|
|
|
|
|
|
|
|
// 应用分类和标签
|
|
|
|
|
|
Categories []string `bson:"categories" json:"categories"` // 应用分类
|
|
|
|
|
|
Tags []string `bson:"tags" json:"tags"` // 标签
|
|
|
|
|
|
AdTypes []string `bson:"adTypes" json:"adTypes"` // 支持的广告类型
|
|
|
|
|
|
|
|
|
|
|
|
// 回调配置
|
|
|
|
|
|
CallbackURL string `bson:"callbackUrl" json:"callbackUrl"` // 回调URL
|
|
|
|
|
|
|
|
|
|
|
|
// 应用特定统计
|
|
|
|
|
|
DailyActiveUsers int64 `bson:"dailyActiveUsers" json:"dailyActiveUsers"` // 日活用户数
|
|
|
|
|
|
MonthlyActiveUsers int64 `bson:"monthlyActiveUsers" json:"monthlyActiveUsers"` // 月活用户数
|
|
|
|
|
|
TotalRequests int64 `bson:"totalRequests" json:"totalRequests"` // 总请求数
|
|
|
|
|
|
DailyRequests int64 `bson:"dailyRequests" json:"dailyRequests"` // 日请求数
|
|
|
|
|
|
MonthlyRequests int64 `bson:"monthlyRequests" json:"monthlyRequests"` // 月请求数
|
|
|
|
|
|
|
|
|
|
|
|
// 联系信息
|
|
|
|
|
|
ContactName string `bson:"contactName" json:"contactName"` // 联系人姓名
|
|
|
|
|
|
ContactEmail string `bson:"contactEmail" json:"contactEmail"` // 联系邮箱
|
|
|
|
|
|
ContactPhone string `bson:"contactPhone" json:"contactPhone"` // 联系电话
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetCollectionName 获取集合名称
|
|
|
|
|
|
func (a *Application) GetCollectionName() string {
|
|
|
|
|
|
return ApplicationCollection
|
2025-12-06 15:24:30 +08:00
|
|
|
|
}
|