2022-09-20 11:12:48 +00:00
|
|
|
package model
|
|
|
|
|
2024-06-04 08:48:31 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
2022-09-23 09:21:27 +00:00
|
|
|
|
2022-09-20 11:12:48 +00:00
|
|
|
type Cronjob struct {
|
|
|
|
BaseModel
|
|
|
|
|
2024-01-22 14:29:19 +00:00
|
|
|
Name string `gorm:"type:varchar(64);not null" json:"name"`
|
|
|
|
Type string `gorm:"type:varchar(64);not null" json:"type"`
|
|
|
|
Spec string `gorm:"type:varchar(64);not null" json:"spec"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2024-04-03 08:50:07 +00:00
|
|
|
Command string `gorm:"type:varchar(64)" json:"command"`
|
2023-06-28 06:30:11 +00:00
|
|
|
ContainerName string `gorm:"type:varchar(64)" json:"containerName"`
|
2022-09-20 11:12:48 +00:00
|
|
|
Script string `gorm:"longtext" json:"script"`
|
|
|
|
Website string `gorm:"type:varchar(64)" json:"website"`
|
2023-08-23 14:44:14 +00:00
|
|
|
AppID string `gorm:"type:varchar(64)" json:"appID"`
|
2024-01-07 14:52:41 +00:00
|
|
|
DBType string `gorm:"type:varchar(64)" json:"dbType"`
|
2022-10-28 10:46:14 +00:00
|
|
|
DBName string `gorm:"type:varchar(64)" json:"dbName"`
|
2022-09-20 11:12:48 +00:00
|
|
|
URL string `gorm:"type:varchar(256)" json:"url"`
|
|
|
|
SourceDir string `gorm:"type:varchar(256)" json:"sourceDir"`
|
|
|
|
ExclusionRules string `gorm:"longtext" json:"exclusionRules"`
|
2022-10-28 10:46:14 +00:00
|
|
|
|
2024-01-25 03:20:42 +00:00
|
|
|
// 已废弃
|
|
|
|
KeepLocal bool `gorm:"type:varchar(64)" json:"keepLocal"`
|
|
|
|
TargetDirID uint64 `gorm:"type:decimal" json:"targetDirID"`
|
|
|
|
|
|
|
|
BackupAccounts string `gorm:"type:varchar(64)" json:"backupAccounts"`
|
|
|
|
DefaultDownload string `gorm:"type:varchar(64)" json:"defaultDownload"`
|
|
|
|
RetainCopies uint64 `gorm:"type:decimal" json:"retainCopies"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2024-01-22 14:29:19 +00:00
|
|
|
Status string `gorm:"type:varchar(64)" json:"status"`
|
|
|
|
EntryIDs string `gorm:"type:varchar(64)" json:"entryIDs"`
|
|
|
|
Records []JobRecords `json:"records"`
|
2024-06-04 08:48:31 +00:00
|
|
|
Secret string `gorm:"type:varchar(64)" json:"secret"`
|
2022-09-23 09:21:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type JobRecords struct {
|
|
|
|
BaseModel
|
|
|
|
|
2023-01-09 14:55:10 +00:00
|
|
|
CronjobID uint `gorm:"type:decimal" json:"cronjobID"`
|
2022-09-28 10:11:36 +00:00
|
|
|
StartTime time.Time `gorm:"type:datetime" json:"startTime"`
|
|
|
|
Interval float64 `gorm:"type:float" json:"interval"`
|
|
|
|
Records string `gorm:"longtext" json:"records"`
|
2022-10-28 10:46:14 +00:00
|
|
|
FromLocal bool `gorm:"type:varchar(64)" json:"source"`
|
|
|
|
File string `gorm:"type:varchar(256)" json:"file"`
|
2022-09-28 10:11:36 +00:00
|
|
|
Status string `gorm:"type:varchar(64)" json:"status"`
|
|
|
|
Message string `gorm:"longtext" json:"message"`
|
2022-09-20 11:12:48 +00:00
|
|
|
}
|