124 lines
7.1 KiB
Go
124 lines
7.1 KiB
Go
package entity
|
||
|
||
// Unpublish current sequence due to new sequence published.
|
||
const (
|
||
TypeUnpublishedByAdmin = "UnpublishedByAdmin"
|
||
TypeUnpublishedByDev = "UnpublishedByDev"
|
||
TypeUnpublishedDueToNewSeq = "UnpublishedDueToNewSeq"
|
||
)
|
||
|
||
const (
|
||
APP_FORBIDDEN_NOT_STATUS = 0
|
||
APP_FORBIDDEN_IS_STATUS = 1
|
||
APP_FORBIDDEN_ALL_STATUS = 2
|
||
)
|
||
|
||
type TestInfo struct {
|
||
Account string `json:"account" bson:"account"`
|
||
Password string `json:"password" bson:"password"`
|
||
Description string `json:"description" bson:"description"`
|
||
Images []string `json:"images" bson:"images"`
|
||
}
|
||
|
||
//App 小程序元信息
|
||
type App struct {
|
||
AppID string `json:"appId" bson:"appId"` //id
|
||
Name string `json:"name" bson:"name"` //名字
|
||
Sequence int `json:"sequence" bson:"sequence"` //版本号
|
||
AppClass string `json:"appClass" bson:"appClass"` //用途 现在改为分类
|
||
AppTag []string `json:"appTag" bson:"appTag"` //标签
|
||
AppType string `json:"appType" bson:"appType"` //应用类型--mop使用为了和应用市场区分开
|
||
Status Status `json:"status" bson:"status"` //状态
|
||
PublishedStatus SpecificStatus `json:"publishedStatus" bson:"publishedStatus"` //上架
|
||
UnpublishedStatus SpecificStatus `json:"unpublishedStatus" bson:"unpublishedStatus"` //下架
|
||
ActionStatus SpecificStatus `json:"actionStatus" bson:"actionStatus"` //上下架
|
||
DeveloperID string `json:"developerId" bson:"developerId"` //开发者id
|
||
GroupID string `json:"groupId" bson:"groupId"` //组id
|
||
Created int64 `json:"created" bson:"created"`
|
||
CreatedBy string `json:"createdBy" bson:"createdBy"`
|
||
CustomData CustomDataInfo `json:"customData" bson:"customData"` //预留
|
||
Version string `json:"version" bson:"version"` //应用版本
|
||
CoreDescription string `json:"coreDescription" bson:"coreDescription"` //小程序简介
|
||
Logo string `json:"logo" bson:"logo"` //图标
|
||
TestInfo TestInfo `json:"testInfo" bson:"testInfo"` //测试信息
|
||
Expire int64 `json:"expire" bson:"expire"`
|
||
IsRollback bool `json:"isRollback" bson:"isRollback"` // 是否回滚发布
|
||
ApplyStatus string `json:"applyStatus" bson:"-"` // 关联审核状态
|
||
IsForbidden int `json:"isForbidden" bson:"isForbidden"` //是否禁用 0:未禁用 1:禁用
|
||
PrivacySettingType int `json:"privacySettingType" bson:"privacySettingType"` //是否设置隐私 0:未设置 1:自定义内容 2:默认
|
||
ProjectType int `json:"projectType" bson:"projectType"` //项目类型,默认 0,代表小程序,1 小游戏,2 H5
|
||
}
|
||
|
||
//AppVersion 小程序版本信息
|
||
type AppVersion struct {
|
||
AppID string `json:"appId" bson:"appId"`
|
||
Name string `json:"name" bson:"name"`
|
||
AppClass string `json:"appClass" bson:"appClass"` //用途 现在改为分类
|
||
AppTag []string `json:"appTag" bson:"appTag"` //标签
|
||
AppType string `json:"appType" bson:"appType"`
|
||
Status Status `json:"status" bson:"status"`
|
||
PublishingStatus SpecificStatus `json:"publishingStatus" bson:"publishingStatus"` //提交上架审核
|
||
UnpublishingStatus SpecificStatus `json:"unpublishingStatus" bson:"unpublishingStatus"` //下架审核
|
||
PublishingApprovalStatus SpecificStatus `json:"publishingApprovalStatus" bson:"publishingApprovalStatus"` //管理员审核上架记录
|
||
UnpublishingApprovalStatus SpecificStatus `json:"unpublishingApprovalStatus" bson:"unpublishingApprovalStatus"` //管理员审核下架记录
|
||
PublishedStatus SpecificStatus `json:"publishedStatus" bson:"publishedStatus"` //执行上架记录
|
||
UnpublishedStatus UnpublishedStatus `json:"unpublishedStatus" bson:"unpublishedStatus"` //执行下架记录
|
||
RequestStatus SpecificStatus `json:"requestStatus" bson:"requestStatus"` //合并开发者申请上下架状态
|
||
ApprovalStatus SpecificStatus `json:"approvalStatus" bson:"approvalStatus"` //合并管理员申请上下架状态
|
||
ActionStatus SpecificStatus `json:"actionStatus" bson:"actionStatus"` //执行上下架合并
|
||
DeveloperID string `json:"developerId" bson:"developerId"`
|
||
GroupID string `json:"groupId" bson:"groupId"`
|
||
Created int64 `json:"created" bson:"created"`
|
||
CreatedBy string `json:"createdBy" bson:"createdBy"` // 提交审核的用户
|
||
CustomData CustomDataInfo `json:"customData" bson:"customData"`
|
||
Version string `json:"version" bson:"version"`
|
||
Sequence int `json:"sequence" bson:"sequence"`
|
||
CorporationID string `json:"corporationId" bson:"corporationId"` //与groupid类似
|
||
CoreDescription string `json:"coreDescription" bson:"coreDescription"`
|
||
Logo string `json:"logo" bson:"logo"`
|
||
IsRollback bool `json:"isRollback" bson:"isRollback"`
|
||
TestInfo TestInfo `json:"testInfo" bson:"testInfo"`
|
||
NeedAutoPub bool `json:"needAutoPub" bson:"needAutoPub"`
|
||
InGrayRelease bool `json:"inGrayRelease" bson:"inGrayRelease"` //是否在灰度发布中
|
||
Expire int64 `json:"expire" bson:"expire"`
|
||
AppBuildID string `json:"appBuildID" bson:"appBuildID"`
|
||
}
|
||
|
||
type SubmitAppReq struct {
|
||
AppId string
|
||
BuildId string
|
||
Account string
|
||
NeedAutoPub bool
|
||
TestInfo TestInfo
|
||
UserId string
|
||
}
|
||
|
||
type AppClassPerRsp struct {
|
||
Class string `bson:"class"`
|
||
Count int `bson:"count"`
|
||
Name []string `bson:"name"`
|
||
}
|
||
|
||
type AdminGetLinkAppsRspItem struct {
|
||
Id string `json:"_id"`
|
||
AppIdDetail struct {
|
||
AppId string `json:"appId"`
|
||
Name string `json:"name"`
|
||
Sequence int `json:"sequence"`
|
||
} `json:"appIdDetail"`
|
||
AppInfos struct {
|
||
AssociatedAt int64 `json:"associatedAt"`
|
||
} `json:"appInfos"`
|
||
BindingId string `json:"bindingId"`
|
||
GroupName string `json:"groupName"`
|
||
Name string `json:"name"`
|
||
}
|
||
|
||
type CItem struct {
|
||
Id string `json:"_id" bson:"_id"`
|
||
}
|
||
|
||
type TagItem struct {
|
||
Id []string `json:"_id" bson:"_id"`
|
||
}
|