68 lines
2.5 KiB
Go
68 lines
2.5 KiB
Go
package entity
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
const APPTEMPINFO_DB_NAME = "appTempInfo"
|
|
|
|
var (
|
|
AppTempDefSequence = 1
|
|
appTempNotFoundErr = errors.New("NOT FOUND")
|
|
)
|
|
|
|
type AppTempInfo 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"` //用途
|
|
AppType string `json:"appType" bson:"appType"` //应用类型--mop使用为了和应用市场区分开
|
|
Status Status `json:"status" bson:"status"` //状态
|
|
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"` //图标
|
|
ProjectType int `json:"rojectType" bson:"projectType"` //项目类型
|
|
}
|
|
|
|
//type IAppTempInfoRepo interface {
|
|
// Insert(ctx context.Context, info *AppTempInfo) error
|
|
// UpdateInfo(ctx context.Context, info *AppTempInfo) error
|
|
// GetInfoByAppId(ctx context.Context, appId string) (*AppTempInfo, error)
|
|
// GetInfoByAppIdAndSeq(ctx context.Context, appId string, seq int) (*AppTempInfo, error)
|
|
// NotFound(err error) bool
|
|
//}
|
|
//
|
|
//func NewDefaultInfo(appId string) *AppTempInfo {
|
|
// now := time.Now().UnixNano() / 1e6
|
|
// return &AppTempInfo{
|
|
// AppID: appId,
|
|
// Name: "",
|
|
// Sequence: AppTempDefSequence,
|
|
// AppClass: "Others",
|
|
// AppType: "Applet",
|
|
// Status: Status{
|
|
// Value: "Published",
|
|
// Reason: "ide测试",
|
|
// LastUpdated: now,
|
|
// ModifiedBy: "ide测试",
|
|
// },
|
|
// DeveloperID: "",
|
|
// GroupID: "",
|
|
// Created: now,
|
|
// CreatedBy: "",
|
|
// CustomData: CustomDataInfo{
|
|
// DetailDescription: "ide测试小程序",
|
|
// VersionDescription: "ide测试小程序",
|
|
// SourceFile: make([]CustomDataSourceFile, 0),
|
|
// },
|
|
// Version: "1.0.0",
|
|
// CoreDescription: "ide测试小程序",
|
|
// Logo: "",
|
|
// }
|
|
//}
|