Files
cid/model/entity/application.go
2025-12-19 09:42:39 +08:00

55 lines
2.5 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 entity
import (
"gitee.com/red-future---jilin-g/common/do"
)
const ApplicationCollection = "application"
// Application 应用实体
type Application struct {
do.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 IDiOS应用
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
}