60 lines
5.5 KiB
Go
60 lines
5.5 KiB
Go
package sql
|
||
|
||
//AppStartParams 小程序启动参数
|
||
|
||
type AppBuildInfo struct {
|
||
Id uint64 `gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
|
||
TraceId string `gorm:"column:trace_id;type:varchar(64);unique;comment:'唯一Id'"`
|
||
BuildInfoId string `gorm:"column:build_info_id;type:varchar(64);comment:'编译信息Id'"`
|
||
Source string `gorm:"column:source;type:varchar(64);comment:'上传版本的状态'"` // 该上传版本的状态: build:正常版本, trail:被设置为体验版
|
||
AppId string `gorm:"column:app_id;type:varchar(64);comment:'小程序id'"`
|
||
GroupID string `gorm:"column:group_id;type:varchar(64);comment:'组id'"`
|
||
UserId string `gorm:"column:user_id;type:varchar(64);comment:'用户id'"`
|
||
CreatedBy string `gorm:"column:created_by;type:varchar(512);comment:'创建人'"`
|
||
Status bool `gorm:"column:status;type:bool;comment:'status';comment:'编译状态'"` //编译状态
|
||
Version string `gorm:"column:version;type:varchar(64);comment:'上传版本号'"`
|
||
VersionDescription string `gorm:"column:version_description;type:varchar(2048);comment:'版本描述'"`
|
||
FileMd5 string `gorm:"column:file_md5;type:varchar(512);default:'';comment:'md5'"`
|
||
Name string `gorm:"column:name;type:varchar(256);default:'';comment:'包名'"`
|
||
SourceFileUrl string `gorm:"column:source_url;type:varchar(512);default:'';comment:'源码包下载地址'"`
|
||
Url string `gorm:"column:url;type:varchar(512);default:'';comment:'编译包下载地址'"`
|
||
EncryptedUrl string `gorm:"column:encrypted_url;type:varchar(512);default:'';comment:'加密后下载地址'"`
|
||
EncryptedFileMd5 string `gorm:"column:encrypted_file_md5;type:varchar(512);default:'';comment:'加密包md5'"`
|
||
EncryptedFileSha256 string `gorm:"column:encrypted_file_sha256;type:varchar(512);default:'';comment:'加密包sha256'"`
|
||
BasicPackVer string `gorm:"column:basic_pack_ver;type:varchar(48);default:'';comment:'基础库版本'"`
|
||
Packages string `gorm:"column:packages;type:TEXT;comment:'分包信息'"`
|
||
EncryptPackages string `gorm:"column:encrypt_packages;type:TEXT;comment:'加密分包信息'"`
|
||
PathAndQuery string `gorm:"column:path_and_query;type:varchar(256);comment:'启动页面path和query'"`
|
||
CreateTime int64 `gorm:"column:create_time;type:BIGINT(16);NOT NULL;comment:'创建时间'"`
|
||
UpdateTime int64 `gorm:"column:update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
|
||
}
|
||
|
||
func (AppBuildInfo) TableName() string {
|
||
return "app_build_infos"
|
||
}
|
||
|
||
type BuildInfo struct {
|
||
Id string `json:"id" gorm:"primary_key;column:id;type:varchar(64);comment:'编译id'" sql:"primary_key" bson:"id"`
|
||
AppId string `json:"appId" gorm:"column:app_id;type:varchar(64);comment:'App id'" bson:"appId"`
|
||
UserId string `json:"userId" gorm:"column:user_id;type:varchar(64);default:0;comment:'用户id'" bson:"userId"` //用户id
|
||
Filename string `json:"filename" gorm:"column:file_name;type:varchar(64);default:'';comment:'文件名'" bson:"filename"` //文件名
|
||
FileUrl string `json:"fileUrl" gorm:"column:file_url;type:varchar(128);default:'';comment:'文件地址'" bson:"fileUrl"` //文件地址
|
||
Content string `json:"content" gorm:"column:content;type:text;comment:''" bson:"content"` //content
|
||
Version string `json:"version" gorm:"column:version;type:varchar(64);default:'';comment:'版本'" bson:"version"` //版本
|
||
VersionRemark string `json:"versionRemark" gorm:"column:version_remark;type:varchar(256);default:'';comment:'VersionRemark'" bson:"versionRemark"` //VersionRemark
|
||
OrganId string `json:"organId" gorm:"column:organ_id;type:varchar(64);default:'';comment:'机构id'" bson:"organId"` //机构id
|
||
Username string `json:"username" gorm:"column:user_name;type:varchar(64);default:'';comment:'用户名'" bson:"username"` //用户名
|
||
CreateTime int64 `json:"createTime" gorm:"column:create_time;type:BIGINT(16);default:0;comment:'创建时间'" bson:"createTime"` //创建时间
|
||
UpdateTime int64 `json:"updateTime" gorm:"column:update_time;type:BIGINT(16);default:0;comment:'更新时间'" bson:"updateTime"` //更新时间
|
||
EncryptedUrl string `json:"encryptedUrl" gorm:"column:encrypted_url;type:varchar(128);default:'';comment:'文件加密地址'" bson:"encryptedUrl"`
|
||
Status string `json:"status" gorm:"column:status;type:varchar(64);default:'';comment:''" bson:"status"`
|
||
Packages string `bson:"packages" gorm:"column:packages;type:TEXT;NOT NULL;comment:'内容'"`
|
||
EncryptPackage string `bson:"encryptPackage" gorm:"column:encryptPackage;type:TEXT;NOT NULL;comment:'内容'"`
|
||
Cmd string `json:"cmd" gorm:"column:cmd;type:varchar(64);default:'';comment:'编译上传类型'" bson:"cmd"` //cmd:为空默认编译上传 create:不编译直接上传 directUploadSource: 直接上传源文件
|
||
BuildStatus string `json:"buildStatus" gorm:"column:buildStatus;type:varchar(64);default:'';comment:'编译状态'" bson:"buildStatus"` //编译中(during),编译成功(success),编译失败(failed)
|
||
}
|
||
|
||
func (BuildInfo) TableName() string {
|
||
return "build_info"
|
||
}
|