2022-09-20 19:12:48 +08:00
|
|
|
package dto
|
|
|
|
|
2022-09-23 17:21:27 +08:00
|
|
|
import "time"
|
|
|
|
|
2022-09-20 19:12:48 +08:00
|
|
|
type CronjobCreate struct {
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
SpecType string `json:"specType" validate:"required"`
|
2023-06-12 18:42:11 +08:00
|
|
|
Week int `json:"week" validate:"number,max=6,min=0"`
|
2023-03-10 10:54:47 +08:00
|
|
|
Day int `json:"day" validate:"number"`
|
|
|
|
Hour int `json:"hour" validate:"number"`
|
|
|
|
Minute int `json:"minute" validate:"number"`
|
2023-05-24 18:36:41 +08:00
|
|
|
Second int `json:"second" validate:"number"`
|
2022-09-20 19:12:48 +08:00
|
|
|
|
|
|
|
Script string `json:"script"`
|
2023-06-28 14:30:11 +08:00
|
|
|
ContainerName string `json:"containerName"`
|
2023-08-23 22:44:14 +08:00
|
|
|
AppID string `json:"appID"`
|
2022-09-20 19:12:48 +08:00
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
2022-10-28 18:46:14 +08:00
|
|
|
DBName string `json:"dbName"`
|
2022-09-20 19:12:48 +08:00
|
|
|
URL string `json:"url"`
|
2022-09-22 14:19:49 +08:00
|
|
|
SourceDir string `json:"sourceDir"`
|
2022-10-28 18:46:14 +08:00
|
|
|
KeepLocal bool `json:"keepLocal"`
|
2022-09-20 19:12:48 +08:00
|
|
|
TargetDirID int `json:"targetDirID"`
|
2022-09-29 16:15:59 +08:00
|
|
|
RetainCopies int `json:"retainCopies" validate:"number,min=1"`
|
2022-09-20 19:12:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type CronjobUpdate struct {
|
2022-12-13 18:54:28 +08:00
|
|
|
ID uint `json:"id" validate:"required"`
|
2022-09-20 19:12:48 +08:00
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
SpecType string `json:"specType" validate:"required"`
|
2023-06-12 18:42:11 +08:00
|
|
|
Week int `json:"week" validate:"number,max=6,min=0"`
|
2023-03-10 10:54:47 +08:00
|
|
|
Day int `json:"day" validate:"number"`
|
|
|
|
Hour int `json:"hour" validate:"number"`
|
|
|
|
Minute int `json:"minute" validate:"number"`
|
2023-05-24 18:36:41 +08:00
|
|
|
Second int `json:"second" validate:"number"`
|
2022-09-20 19:12:48 +08:00
|
|
|
|
|
|
|
Script string `json:"script"`
|
2023-06-28 14:30:11 +08:00
|
|
|
ContainerName string `json:"containerName"`
|
2023-08-23 22:44:14 +08:00
|
|
|
AppID string `json:"appID"`
|
2022-09-20 19:12:48 +08:00
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
2022-10-28 18:46:14 +08:00
|
|
|
DBName string `json:"dbName"`
|
2022-09-20 19:12:48 +08:00
|
|
|
URL string `json:"url"`
|
2022-09-22 14:19:49 +08:00
|
|
|
SourceDir string `json:"sourceDir"`
|
2022-10-28 18:46:14 +08:00
|
|
|
KeepLocal bool `json:"keepLocal"`
|
2022-09-22 14:19:49 +08:00
|
|
|
TargetDirID int `json:"targetDirID"`
|
2022-09-29 16:15:59 +08:00
|
|
|
RetainCopies int `json:"retainCopies" validate:"number,min=1"`
|
2022-09-27 17:26:01 +08:00
|
|
|
}
|
2022-09-20 19:12:48 +08:00
|
|
|
|
2022-09-27 17:26:01 +08:00
|
|
|
type CronjobUpdateStatus struct {
|
|
|
|
ID uint `json:"id" validate:"required"`
|
|
|
|
Status string `json:"status" validate:"required"`
|
2022-09-20 19:12:48 +08:00
|
|
|
}
|
|
|
|
|
2022-09-28 00:08:21 +08:00
|
|
|
type CronjobDownload struct {
|
|
|
|
RecordID uint `json:"recordID" validate:"required"`
|
|
|
|
BackupAccountID uint `json:"backupAccountID" validate:"required"`
|
|
|
|
}
|
|
|
|
|
2023-04-11 18:48:28 +08:00
|
|
|
type CronjobClean struct {
|
|
|
|
CleanData bool `json:"cleanData"`
|
|
|
|
CronjobID uint `json:"cronjobID" validate:"required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CronjobBatchDelete struct {
|
|
|
|
CleanData bool `json:"cleanData"`
|
|
|
|
IDs []uint `json:"ids"`
|
|
|
|
}
|
|
|
|
|
2022-09-20 19:12:48 +08:00
|
|
|
type CronjobInfo struct {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
SpecType string `json:"specType"`
|
|
|
|
Week int `json:"week"`
|
|
|
|
Day int `json:"day"`
|
|
|
|
Hour int `json:"hour"`
|
|
|
|
Minute int `json:"minute"`
|
2023-05-24 18:36:41 +08:00
|
|
|
Second int `json:"second"`
|
2022-09-20 19:12:48 +08:00
|
|
|
|
|
|
|
Script string `json:"script"`
|
2023-06-28 14:30:11 +08:00
|
|
|
ContainerName string `json:"containerName"`
|
2023-08-23 22:44:14 +08:00
|
|
|
AppID string `json:"appID"`
|
2022-09-20 19:12:48 +08:00
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
2022-10-28 18:46:14 +08:00
|
|
|
DBName string `json:"dbName"`
|
2022-09-20 19:12:48 +08:00
|
|
|
URL string `json:"url"`
|
2022-09-22 14:19:49 +08:00
|
|
|
SourceDir string `json:"sourceDir"`
|
2022-10-28 18:46:14 +08:00
|
|
|
KeepLocal bool `json:"keepLocal"`
|
2022-09-20 19:12:48 +08:00
|
|
|
TargetDir string `json:"targetDir"`
|
|
|
|
TargetDirID int `json:"targetDirID"`
|
2022-09-29 16:15:59 +08:00
|
|
|
RetainCopies int `json:"retainCopies"`
|
2022-09-20 19:12:48 +08:00
|
|
|
|
2023-05-30 15:30:57 +08:00
|
|
|
LastRecordTime string `json:"lastRecordTime"`
|
2022-09-29 16:15:59 +08:00
|
|
|
Status string `json:"status"`
|
2022-09-20 19:12:48 +08:00
|
|
|
}
|
2022-09-23 17:21:27 +08: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 {
|
|
|
|
ID uint `json:"id"`
|
|
|
|
StartTime time.Time `json:"startTime"`
|
|
|
|
Records string `json:"records"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Message string `json:"message"`
|
|
|
|
TargetPath string `json:"targetPath"`
|
|
|
|
Interval int `json:"interval"`
|
2023-02-24 12:26:23 +08:00
|
|
|
File string `json:"file"`
|
2022-09-23 17:21:27 +08:00
|
|
|
}
|