2018-05-10 18:54:32 +08:00
|
|
|
package model
|
|
|
|
|
2019-08-22 16:07:26 +08:00
|
|
|
// AppStatus app status
|
2018-05-10 18:54:32 +08:00
|
|
|
type AppStatus struct {
|
2018-05-15 11:03:03 +08:00
|
|
|
EventID string `gorm:"column:event_id;size:32;primary_key" json:"event_id"`
|
|
|
|
Format string `gorm:"column:format;size:32" json:"format"` // only rainbond-app/docker-compose
|
|
|
|
SourceDir string `gorm:"column:source_dir;size:255" json:"source_dir"`
|
2018-05-24 09:51:09 +08:00
|
|
|
Apps string `gorm:"column:apps;type:text" json:"apps"`
|
2018-09-25 21:55:51 +08:00
|
|
|
Status string `gorm:"column:status;size:32" json:"status"` // only exporting/importing/failed/success/cleaned
|
2018-05-15 11:03:03 +08:00
|
|
|
TarFileHref string `gorm:"column:tar_file_href;size:255" json:"tar_file_href"`
|
2018-05-23 15:53:12 +08:00
|
|
|
Metadata string `gorm:"column:metadata;type:text" json:"metadata"`
|
2018-05-10 18:54:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//TableName 表名
|
|
|
|
func (t *AppStatus) TableName() string {
|
2018-11-22 14:33:29 +08:00
|
|
|
return "region_app_status"
|
2018-05-10 18:54:32 +08:00
|
|
|
}
|
2018-05-23 11:08:44 +08:00
|
|
|
|
|
|
|
//AppBackup app backup info
|
|
|
|
type AppBackup struct {
|
|
|
|
Model
|
|
|
|
EventID string `gorm:"column:event_id;size:32;" json:"event_id"`
|
|
|
|
BackupID string `gorm:"column:backup_id;size:32;" json:"backup_id"`
|
|
|
|
GroupID string `gorm:"column:group_id;size:32;" json:"group_id"`
|
2018-05-23 16:43:16 +08:00
|
|
|
//Status in starting,failed,success,restore
|
2018-05-23 11:08:44 +08:00
|
|
|
Status string `gorm:"column:status;size:32" json:"status"`
|
|
|
|
Version string `gorm:"column:version;size:32" json:"version"`
|
|
|
|
SourceDir string `gorm:"column:source_dir;size:255" json:"source_dir"`
|
2018-05-24 10:09:07 +08:00
|
|
|
SourceType string `gorm:"column:source_type;size:255;default:'local'" json:"source_type"`
|
2018-05-23 11:08:44 +08:00
|
|
|
BackupMode string `gorm:"column:backup_mode;size:32" json:"backup_mode"`
|
2020-02-12 12:40:22 +08:00
|
|
|
BuckupSize int64 `gorm:"column:backup_size;type:bigint" json:"backup_size"`
|
2018-06-07 13:18:53 +08:00
|
|
|
Deleted bool `gorm:"column:deleted" json:"deleted"`
|
2018-05-23 11:08:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
//TableName 表名
|
|
|
|
func (t *AppBackup) TableName() string {
|
2018-11-22 14:33:29 +08:00
|
|
|
return "region_app_backup"
|
2018-05-23 11:08:44 +08:00
|
|
|
}
|
2020-09-17 15:45:46 +08:00
|
|
|
|