2022-09-20 11:12:48 +00:00
|
|
|
package dto
|
|
|
|
|
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 CronjobCreate struct {
|
2024-01-22 14:29:19 +00:00
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
Spec string `json:"spec" validate:"required"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2024-01-25 03:20:42 +00:00
|
|
|
Script string `json:"script"`
|
2024-04-03 08:50:07 +00:00
|
|
|
Command string `json:"command"`
|
2024-01-25 03:20:42 +00:00
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
AppID string `json:"appID"`
|
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
|
|
|
DBType string `json:"dbType"`
|
|
|
|
DBName string `json:"dbName"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
SourceDir string `json:"sourceDir"`
|
|
|
|
|
|
|
|
BackupAccounts string `json:"backupAccounts"`
|
|
|
|
DefaultDownload string `json:"defaultDownload"`
|
|
|
|
RetainCopies int `json:"retainCopies" validate:"number,min=1"`
|
2024-06-04 08:48:31 +00:00
|
|
|
Secret string `json:"secret"`
|
2022-09-20 11:12:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type CronjobUpdate struct {
|
2024-01-22 14:29:19 +00:00
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Spec string `json:"spec" validate:"required"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2024-01-25 03:20:42 +00:00
|
|
|
Script string `json:"script"`
|
2024-04-03 08:50:07 +00:00
|
|
|
Command string `json:"command"`
|
2024-01-25 03:20:42 +00:00
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
AppID string `json:"appID"`
|
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
|
|
|
DBType string `json:"dbType"`
|
|
|
|
DBName string `json:"dbName"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
SourceDir string `json:"sourceDir"`
|
|
|
|
|
|
|
|
BackupAccounts string `json:"backupAccounts"`
|
|
|
|
DefaultDownload string `json:"defaultDownload"`
|
|
|
|
RetainCopies int `json:"retainCopies" validate:"number,min=1"`
|
2024-06-04 08:48:31 +00:00
|
|
|
Secret string `json:"secret"`
|
2022-09-27 09:26:01 +00:00
|
|
|
}
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2022-09-27 09:26:01 +00:00
|
|
|
type CronjobUpdateStatus struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Status string `json:"status" validate:"required"`
|
2022-09-20 11:12:48 +00:00
|
|
|
}
|
|
|
|
|
2022-09-27 16:08:21 +00:00
|
|
|
type CronjobDownload struct {
|
|
|
|
RecordID uint `json:"recordID" validate:"required"`
|
|
|
|
BackupAccountID uint `json:"backupAccountID" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2023-04-11 10:48:28 +00:00
|
|
|
type CronjobClean struct {
|
2024-02-01 10:05:40 +00:00
|
|
|
IsDelete bool `json:"isDelete"`
|
2023-04-11 10:48:28 +00:00
|
|
|
CleanData bool `json:"cleanData"`
|
|
|
|
CronjobID uint `json:"cronjobID" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CronjobBatchDelete struct {
|
|
|
|
CleanData bool `json:"cleanData"`
|
2023-10-27 06:19:26 +00:00
|
|
|
IDs []uint `json:"ids" validate:"required"`
|
2023-04-11 10:48:28 +00:00
|
|
|
}
|
|
|
|
|
2022-09-20 11:12:48 +00:00
|
|
|
type CronjobInfo struct {
|
2024-01-22 14:29:19 +00:00
|
|
|
ID uint `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Spec string `json:"spec"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2024-01-25 03:20:42 +00:00
|
|
|
Script string `json:"script"`
|
2024-04-03 08:50:07 +00:00
|
|
|
Command string `json:"command"`
|
2024-01-25 03:20:42 +00:00
|
|
|
ContainerName string `json:"containerName"`
|
|
|
|
AppID string `json:"appID"`
|
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
|
|
|
DBType string `json:"dbType"`
|
|
|
|
DBName string `json:"dbName"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
SourceDir string `json:"sourceDir"`
|
|
|
|
BackupAccounts string `json:"backupAccounts"`
|
|
|
|
DefaultDownload string `json:"defaultDownload"`
|
|
|
|
RetainCopies int `json:"retainCopies"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2023-05-30 07:30:57 +00:00
|
|
|
LastRecordTime string `json:"lastRecordTime"`
|
2022-09-29 08:15:59 +00:00
|
|
|
Status string `json:"status"`
|
2024-06-04 08:48:31 +00:00
|
|
|
Secret string `json:"secret"`
|
2022-09-20 11:12:48 +00:00
|
|
|
}
|
2022-09-23 09:21:27 +00:00
|
|
|
|
|
|
|
type SearchRecord struct {
|
|
|
|
PageInfo
|
|
|
|
CronjobID int `json:"cronjobID"`
|
|
|
|
StartTime time.Time `json:"startTime"`
|
|
|
|
EndTime time.Time `json:"endTime"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Record struct {
|
2024-05-31 05:47:19 +00:00
|
|
|
ID uint `json:"id"`
|
|
|
|
StartTime string `json:"startTime"`
|
|
|
|
Records string `json:"records"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
TargetPath string `json:"targetPath"`
|
|
|
|
Interval int `json:"interval"`
|
|
|
|
File string `json:"file"`
|
2022-09-23 09:21:27 +00:00
|
|
|
}
|