55 lines
2.5 KiB
Go
55 lines
2.5 KiB
Go
package entity
|
||
|
||
import (
|
||
"gitea.com/red-future/common/beans"
|
||
)
|
||
|
||
const ApplicationCollection = "application"
|
||
|
||
// Application 应用实体
|
||
type Application struct {
|
||
beans.MongoBaseDO `bson:",inline" json:",inline"`
|
||
Status string `bson:"status" json:"status"` // 状态:active、inactive、maintenance等
|
||
|
||
// 应用基本信息
|
||
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
|
||
}
|