47 lines
2.5 KiB
Go
47 lines
2.5 KiB
Go
|
package entity
|
||
|
|
||
|
const QRCODEINFO_DB_NAME = "qrCodeInfo"
|
||
|
|
||
|
const (
|
||
|
QrCodeTypeReview = "review" //审核版二维码信息
|
||
|
QrCodeTypeTrial = "trial" //体验版
|
||
|
QrCodeTypeTemporary = "temporary" //临时版
|
||
|
QrCodeTypeRelease = "release" //线上版
|
||
|
QrCodeTypeRomoteDebug = "remoteDebug" //真机调试版
|
||
|
)
|
||
|
|
||
|
//AppStartParams 小程序启动参数
|
||
|
type AppStartParams struct {
|
||
|
PathAndQuery string `json:"pathAndQuery" bson:"path_and_query"`
|
||
|
}
|
||
|
|
||
|
type QrCodeInfo struct {
|
||
|
Type string `json:"type" bson:"type"` //二维码的类型
|
||
|
Uuid string `json:"uuid" bson:"uuid"` //标识该二维码
|
||
|
AppId string `json:"appId" bson:"appId"` //小程序Id
|
||
|
Sequence int `json:"sequence" bson:"sequence"` //小程序序列号
|
||
|
ApiServer string `json:"apiServer" bson:"apiServer"` //小程序apiServer
|
||
|
CodeId string `json:"codeId" bson:"codeId"` //标识某个编译版本的id
|
||
|
StartParams AppStartParams `json:"startParams" bson:"startParams"` //小程序启动参数
|
||
|
ExpireTime int64 `json:"expireTime" bson:"expireTime"` //过期时间
|
||
|
CreateTime int64 `json:"createTime" bson:"createTime"` //创建时间
|
||
|
UpdateTime int64 `json:"updateTime" bson:"UpdateTime"` //更新时间
|
||
|
DeleteTime int64 `json:"deleteTime" bson:"DeleteTime"` //删除时间-暂不用
|
||
|
DebugInfo map[string]interface{} `json:"debugInfo" bson:"debugInfo"` //拓展数据
|
||
|
}
|
||
|
|
||
|
//type IQrCodeInfoRepo interface {
|
||
|
// Insert(ctx context.Context, info *QrCodeInfo) error
|
||
|
// GenInfo(ctx context.Context, info *QrCodeInfo) error
|
||
|
// GetInfoByUuid(ctx context.Context, uuid string) (*QrCodeInfo, error)
|
||
|
// GetReviewInfo(ctx context.Context, appId string, seq int) (*QrCodeInfo, error)
|
||
|
// GetReleaseInfo(ctx context.Context, appId string) (*QrCodeInfo, error)
|
||
|
// GetTrialInfo(ctx context.Context, appId string) (*QrCodeInfo, error)
|
||
|
// GetTemporaryInfo(ctx context.Context, appId string, seq int) (*QrCodeInfo, error)
|
||
|
// UpdateTrialStartParams(ctx context.Context, codeId string, p AppStartParams) error
|
||
|
// UpdateApiServer(ctx context.Context, uuid string, apiServer string) error
|
||
|
// UpdateInfo(ctx context.Context, uuid string, upInfo map[string]interface{}) error
|
||
|
// GenReviewQrCodeInfo(ctx context.Context, info *QrCodeInfo) error
|
||
|
// NotFound(err error) bool
|
||
|
//}
|