1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00
1Panel/agent/app/model/backup.go
ssongliu 78199a49ed
feat: Add usage scope for backup accounts (#7716)
* feat: Add usage scope for backup accounts

* fix: 解决计划任务列表不显示备份账号的问题

* feat: 统一备份文件大小获取接口
2025-01-14 14:27:51 +08:00

30 lines
903 B
Go

package model
type BackupAccount struct {
BaseModel
Name string `gorm:"not null;default:''" json:"name"`
Type string `gorm:"not null;default:''" json:"type"`
IsPublic bool `json:"isPublic"`
Bucket string `json:"bucket"`
AccessKey string `json:"accessKey"`
Credential string `json:"credential"`
BackupPath string `json:"backupPath"`
Vars string `json:"vars"`
RememberAuth bool `json:"rememberAuth"`
}
type BackupRecord struct {
BaseModel
From string `json:"from"`
CronjobID uint `json:"cronjobID"`
SourceAccountIDs string `json:"sourceAccountIDs"`
DownloadAccountID uint `json:"downloadAccountID"`
Type string `gorm:"not null;default:''" json:"type"`
Name string `gorm:"not null;default:''" json:"name"`
DetailName string `json:"detailName"`
FileDir string `json:"fileDir"`
FileName string `json:"fileName"`
}