提交
This commit is contained in:
@@ -4,11 +4,11 @@ import "time"
|
||||
|
||||
// BackupPolicy 备份策略
|
||||
type BackupPolicy struct {
|
||||
ID uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
ID uint64 `json:"id" gorm:"primaryKey"`
|
||||
Name string `json:"name" gorm:"size:128;not null"` // 策略名称
|
||||
BackupType string `json:"backup_type" gorm:"size:32;not null"` // full=全量, incremental=增量
|
||||
TargetType string `json:"target_type" gorm:"size:32;not null"` // local=本地, minio=MinIO
|
||||
TargetConfig string `json:"target_config" gorm:"type:json"` // 目标配置JSON
|
||||
TargetConfig string `json:"target_config" gorm:"type:text"` // 目标配置JSON
|
||||
IncludeDB int8 `json:"include_db" gorm:"default:1"` // 是否备份数据库
|
||||
IncludeFiles int8 `json:"include_files" gorm:"default:1"` // 是否备份文件
|
||||
CronExpr string `json:"cron_expr" gorm:"size:64"` // cron表达式
|
||||
@@ -26,7 +26,7 @@ func (BackupPolicy) TableName() string {
|
||||
|
||||
// BackupLog 备份执行日志
|
||||
type BackupLog struct {
|
||||
ID uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
ID uint64 `json:"id" gorm:"primaryKey"`
|
||||
PolicyID uint64 `json:"policy_id" gorm:"index;not null"`
|
||||
PolicyName string `json:"policy_name" gorm:"size:128"`
|
||||
BackupType string `json:"backup_type" gorm:"size:32"`
|
||||
|
||||
Reference in New Issue
Block a user