finclip-app-manager/infrastructure/db/entity/sql/app.go

180 lines
16 KiB
Go
Raw Permalink Normal View History

2023-10-31 14:07:26 +08:00
package sql
type App struct {
Id uint64 `gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
AppId string `gorm:"column:app_id;unique;type:varchar(48);NOT NULL;comment:'小程序id'"`
AppClass string `gorm:"column:app_class;type:varchar(48);default:'';comment:'小程序分类'"`
AppTag string `gorm:"column:app_tag;type:varchar(2056);default:'';comment:'小程序分类'"`
AppType string `gorm:"column:app_type;type:varchar(128);default:'';comment:'小程序元类型'"`
Name string `gorm:"column:name;type:varchar(48);default:'';comment:'小程序名称'"`
Logo string `gorm:"column:logo;type:varchar(1024);default:'';comment:'小程序logo'"`
Desc string `gorm:"column:desc;type:varchar(1024);default:'';comment:'小程序简介'"`
DetailDesc string `gorm:"column:detail_desc;type:varchar(1024);default:'';comment:'小程序详细描述'"`
Class string `gorm:"column:class;type:varchar(128);comment:'小程序分类'"`
CreatedBy string `gorm:"column:created_by;type:varchar(128);default:'';comment:'小程序创建人'"`
DeveloperId string `gorm:"column:developer_id;type:varchar(48);NOT NULL;comment:'开发者id'"`
GroupId string `gorm:"column:group_id;type:varchar(48);NOT NULL;comment:'企业id'"`
IsRollback int `gorm:"column:is_rollback;type:BIGINT(16);default:0;comment:'是否回滚'"` //1:回滚
Ext string `gorm:"column:ext;type:TEXT;NOT NULL;comment:'扩展字段'"` //例如:提交审核的测试信息可以放在这里
StatusInfo AppStatusInfo `gorm:"foreignKey:app_id;references:app_id"`
IsForbidden int `gorm:"column:is_forbidden;type:BIGINT(16);default:0;comment:'是否禁用'"` //是否禁用 0:未禁用 1:禁用
PrivacySettingType int `gorm:"column:privacy_setting_type;type:tinyint(1);default:0;comment:'是否设置隐私'"`
ProjectType int `gorm:"column:project_type;type:tinyint(1);default:0;comment:'项目类型'"`
Expire int64 `gorm:"column:expire;type:BIGINT(16);default:0;NOT NULL;comment:'小程序过期时间'"`
CreateTime int64 `gorm:"column:create_time;type:BIGINT(16);default:0;NOT NULL;comment:'创建时间'"`
UpdateTime int64 `gorm:"column:update_time;type:BIGINT(16);default:0;default:0;comment:'更新时间'"`
}
func (App) TableName() string {
return "apps"
}
type AppV2 struct {
Id uint64 `gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
AppId string `gorm:"column:app_id;unique;type:varchar(48);NOT NULL;comment:'小程序id'"`
AppClass string `gorm:"column:app_class;type:varchar(48);default:'';comment:'小程序分类'"`
AppTag string `gorm:"column:app_tag;type:varchar(2056);default:'';comment:'小程序分类'"`
AppType string `gorm:"column:app_type;type:varchar(128);default:'';comment:'小程序元类型'"`
Name string `gorm:"column:name;type:varchar(48);default:'';comment:'小程序名称'"`
Logo string `gorm:"column:logo;type:varchar(1024);default:'';comment:'小程序logo'"`
Desc string `gorm:"column:desc;type:varchar(1024);default:'';comment:'小程序简介'"`
DetailDesc string `gorm:"column:detail_desc;type:varchar(1024);default:'';comment:'小程序详细描述'"`
Class string `gorm:"column:class;type:varchar(128);comment:'小程序分类'"`
CreatedBy string `gorm:"column:created_by;type:varchar(128);default:'';comment:'小程序创建人'"`
DeveloperId string `gorm:"column:developer_id;type:varchar(48);NOT NULL;comment:'开发者id'"`
GroupId string `gorm:"column:group_id;type:varchar(48);NOT NULL;comment:'企业id'"`
IsRollback int `gorm:"column:is_rollback;type:BIGINT(16);default:0;comment:'是否回滚'"` //1:回滚
Ext string `gorm:"column:ext;type:TEXT;NOT NULL;comment:'扩展字段'"` //例如:提交审核的测试信息可以放在这里
IsForbidden int `gorm:"column:is_forbidden;type:BIGINT(16);default:0;comment:'是否禁用'"` //是否禁用 0:未禁用 1:禁用
PrivacySettingType int `gorm:"column:privacy_setting_type;type:tinyint(1);default:0;comment:'是否设置隐私'"`
ProjectType int `gorm:"column:project_type;type:tinyint(1);default:0;comment:'项目类型'"`
Expire int64 `gorm:"column:expire;type:BIGINT(16);default:0;NOT NULL;comment:'小程序过期时间'"`
CreateTime int64 `gorm:"column:create_time;type:BIGINT(16);default:0;NOT NULL;comment:'创建时间'"`
UpdateTime int64 `gorm:"column:update_time;type:BIGINT(16);default:0;default:0;comment:'更新时间'"`
}
func (AppV2) TableName() string {
return "apps"
}
type AppStatusInfo struct {
Id uint64 `gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
AppId string `gorm:"column:app_id;type:varchar(48);unique;NOT NULL;comment:'小程序id'"`
StatusValue string `gorm:"column:status_value;type:varchar(64);default:'';comment:'当前小程序状态信息'"`
StatusReason string `gorm:"column:status_reason;type:varchar(1024);default:'';comment:'当前小程序状态原因'"` //审核被拒等
StatusUpdateTime int64 `gorm:"column:status_update_time;type:BIGINT(16);default:0;comment:'当前小程序状态更新时间'"`
StatusUpdater string `gorm:"column:status_updater;type:varchar(128);default:'';comment:'当前小程序状态更新人'"`
PublishedReason string `gorm:"column:published_reason;type:varchar(1024);default:'';comment:'上架信息'"`
PublishedUpdateTime int64 `gorm:"column:published_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
PublishedUpdater string `gorm:"column:published_updater;type:varchar(128);default:'';comment:'更新人'"`
UnpublishedReason string `gorm:"column:unpublished_reason;type:varchar(1024);default:'';comment:'下架信息'"`
UnpublishedUpdateTime int64 `gorm:"column:unpublished_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
UnpublishedUpdater string `gorm:"column:unpublished_updater;type:varchar(128);default:'';comment:'更新人'"`
ActionReason string `gorm:"column:action_reason;type:varchar(1024);default:'';comment:'最近更新信息'"`
ActionUpdateTime int64 `gorm:"column:action_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
ActionUpdater string `gorm:"column:action_updater;type:varchar(128);default:'';comment:'更新人'"`
CreateTime int64 `gorm:"column:create_time;type:BIGINT(16);default:0;comment:'创建时间'"`
UpdateTime int64 `gorm:"column:update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
}
func (AppStatusInfo) TableName() string {
return "app_status_infos"
}
type AppVersion struct {
Id uint64 `gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
AppId string `gorm:"column:app_id;uniqueIndex:appid_seq;type:varchar(48);NOT NULL;comment:'小程序id'"`
Sequence int `gorm:"column:sequence;uniqueIndex:appid_seq;type:BIGINT(16);default:0;comment:'小程序序列号'"`
Name string `gorm:"column:name;type:varchar(48);default:'';comment:'小程序名称'"`
Logo string `gorm:"column:logo;type:varchar(1024);default:'';comment:'小程序logo'"`
Version string `gorm:"column:version;type:varchar(48);default:'';comment:'版本号'"`
Desc string `gorm:"column:desc;type:varchar(1024);default:'';comment:'小程序简介'"`
DetailDesc string `gorm:"column:detail_desc;type:varchar(1024);default:'';comment:'小程序详细描述'"`
Class string `gorm:"column:class;type:varchar(128);comment:'小程序分类'"`
Tag string `gorm:"column:tag;type:varchar(1024);NOT NULL;comment:'小程序标签'"` //例子:"a,b"
AppType string `gorm:"column:app_type;type:varchar(128);default:'';comment:'小程序元类型'"`
DeveloperId string `gorm:"column:developer_id;type:varchar(48);NOT NULL;comment:'开发者id'"`
GroupId string `gorm:"column:group_id;type:varchar(48);NOT NULL;comment:'企业id'"`
AutoPub bool `gorm:"column:auto_pub;type:bool;default:0;comment:'是否审核通过之后自动上架'"` //1:自动上架
InGrayRelease bool `gorm:"column:in_gray_release;type:bool;default:false;comment:'是否灰度中'"` //1:灰度中
Ext string `gorm:"column:ext;type:TEXT;NOT NULL;comment:'扩展字段'"` //例如:提交审核的测试信息可以放在这里
BuildInfoId string `gorm:"column:build_info_id;type:varchar(48);NOT NULL;comment:'编译信息id'"`
BuildInfo AppBuildInfo `gorm:"foreignKey:build_info_id;references:trace_id"`
StatusInfo AppVersionStatusInfo `gorm:"foreignKey:app_id,sequence;references:app_id,sequence"`
CreatedBy string `gorm:"column:created_by;type:varchar(128);default:'';comment:'小程序创建人'"`
IsRollback bool `gorm:"column:is_rollback;type:bool;default:false;comment:'是否回滚'"`
TestInfo string `gorm:"column:test_info;type:TEXT;comment:'测试信息'"`
ExpireTime int64 `gorm:"column:expire_time;type:BIGINT(16);default:0;NOT NULL;comment:'小程序过期时间'"`
CreateTime int64 `gorm:"column:create_time;type:BIGINT(16);default:0;NOT NULL;comment:'创建时间'"`
UpdateTime int64 `gorm:"column:update_time;type:BIGINT(16);default:0;default:0;comment:'更新时间'"`
}
func (AppVersion) TableName() string {
return "app_versions"
}
type AppVersionV2 struct {
Id uint64 `gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
AppId string `gorm:"column:app_id;uniqueIndex:appid_seq;type:varchar(48);NOT NULL;comment:'小程序id'"`
Sequence int `gorm:"column:sequence;uniqueIndex:appid_seq;type:BIGINT(16);default:0;comment:'小程序序列号'"`
Name string `gorm:"column:name;type:varchar(48);default:'';comment:'小程序名称'"`
Logo string `gorm:"column:logo;type:varchar(1024);default:'';comment:'小程序logo'"`
Version string `gorm:"column:version;type:varchar(48);default:'';comment:'版本号'"`
Desc string `gorm:"column:desc;type:varchar(1024);default:'';comment:'小程序简介'"`
DetailDesc string `gorm:"column:detail_desc;type:varchar(1024);default:'';comment:'小程序详细描述'"`
Class string `gorm:"column:class;type:varchar(128);comment:'小程序分类'"`
Tag string `gorm:"column:tag;type:varchar(1024);NOT NULL;comment:'小程序标签'"` //例子:"a,b"
AppType string `gorm:"column:app_type;type:varchar(128);default:'';comment:'小程序元类型'"`
DeveloperId string `gorm:"column:developer_id;type:varchar(48);NOT NULL;comment:'开发者id'"`
GroupId string `gorm:"column:group_id;type:varchar(48);NOT NULL;comment:'企业id'"`
AutoPub bool `gorm:"column:auto_pub;type:bool;default:0;comment:'是否审核通过之后自动上架'"` //1:自动上架
InGrayRelease bool `gorm:"column:in_gray_release;type:bool;default:false;comment:'是否灰度中'"` //1:灰度中
Ext string `gorm:"column:ext;type:TEXT;NOT NULL;comment:'扩展字段'"` //例如:提交审核的测试信息可以放在这里
BuildInfoId string `gorm:"column:build_info_id;type:varchar(48);NOT NULL;comment:'编译信息id'"`
CreatedBy string `gorm:"column:created_by;type:varchar(128);default:'';comment:'小程序创建人'"`
IsRollback bool `gorm:"column:is_rollback;type:bool;default:false;comment:'是否回滚'"`
TestInfo string `gorm:"column:test_info;type:TEXT;comment:'测试信息'"`
ExpireTime int64 `gorm:"column:expire_time;type:BIGINT(16);default:0;NOT NULL;comment:'小程序过期时间'"`
CreateTime int64 `gorm:"column:create_time;type:BIGINT(16);default:0;NOT NULL;comment:'创建时间'"`
UpdateTime int64 `gorm:"column:update_time;type:BIGINT(16);default:0;default:0;comment:'更新时间'"`
}
func (AppVersionV2) TableName() string {
return "app_versions"
}
type AppVersionStatusInfo struct {
Id uint64 `gorm:"primary_key;column:id;type:BIGINT(16) AUTO_INCREMENT;comment:'自增id'" sql:"auto_increment;primary_key"`
AppId string `gorm:"column:app_id;uniqueIndex:appid_seq;type:varchar(48);NOT NULL;comment:'小程序id'"`
Sequence int `gorm:"column:sequence;uniqueIndex:appid_seq;type:BIGINT(16);default:0;comment:'小程序序列号'"`
StatusValue string `gorm:"column:status_value;type:varchar(64);default:'';comment:'当前小程序状态信息'"`
StatusReason string `gorm:"column:status_reason;type:varchar(1024);default:'';comment:'当前小程序状态原因'"` //审核被拒等
StatusUpdateTime int64 `gorm:"column:status_update_time;type:BIGINT(16);default:0;comment:'当前小程序状态更新时间'"`
StatusUpdater string `gorm:"column:status_updater;type:varchar(128);default:'';comment:'当前小程序状态更新人'"`
PublishingReason string `gorm:"column:publishing_reason;type:varchar(1024);default:'';comment:'小程序提交审核信息'"`
PublishingUpdateTime int64 `gorm:"column:publishing_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
PublishingUpdater string `gorm:"column:publishing_updater;type:varchar(128);default:'';comment:'更新人'"`
PublishedReason string `gorm:"column:published_reason;type:varchar(1024);default:'';comment:'上架信息'"`
PublishedUpdateTime int64 `gorm:"column:published_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
PublishedUpdater string `gorm:"column:published_updater;type:varchar(128);default:'';comment:'更新人'"`
UnpublishedReason string `gorm:"column:unpublished_reason;type:varchar(1024);default:'';comment:'下架信息'"`
UnpublishedUpdateTime int64 `gorm:"column:unpublished_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
UnpublishedUpdater string `gorm:"column:unpublished_updater;type:varchar(128);default:'';comment:'更新人'"`
UnpublishedType string `gorm:"column:unpublished_type;type:varchar(256);default:'';comment:'下架类型'"`
ApprovalReason string `gorm:"column:approval_reason;type:varchar(1024);default:'';comment:'审核信息'"`
ApprovalUpdateTime int64 `gorm:"column:approval_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
ApprovalUpdater string `gorm:"column:approval_updater;type:varchar(128);default:'';comment:'更新人'"`
ActionReason string `gorm:"column:action_reason;type:varchar(1024);default:'';comment:'最近更新信息'"`
ActionUpdateTime int64 `gorm:"column:action_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
ActionUpdater string `gorm:"column:action_updater;type:varchar(128);default:'';comment:'更新人'"`
PublishingApprovalReason string `gorm:"column:publishing_approval_reason;type:varchar(1024);default:'';comment:'审核通过信息'"`
PublishingApprovalUpdateTime int64 `gorm:"column:publishing_approval_update_time;type:BIGINT(16);default:0;comment:'更新时间'"`
PublishingApprovalUpdater string `gorm:"column:publishing_approval_updater;type:varchar(128);default:'';comment:'更新人'"`
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 (AppVersionStatusInfo) TableName() string {
return "app_version_status_infos"
}