2022-09-20 11:12:48 +00:00
|
|
|
package dto
|
|
|
|
|
2022-09-23 09:21:27 +00:00
|
|
|
import "time"
|
|
|
|
|
2022-09-20 11:12:48 +00:00
|
|
|
type CronjobCreate struct {
|
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
Type string `json:"type" validate:"required"`
|
|
|
|
SpecType string `json:"specType" validate:"required"`
|
|
|
|
Week int `json:"week" validate:"number,max=7,min=1"`
|
|
|
|
Day int `json:"day" validate:"number,max=31,min=1"`
|
|
|
|
Hour int `json:"hour" validate:"number,max=23,min=0"`
|
|
|
|
Minute int `json:"minute" validate:"number,max=59,min=0"`
|
|
|
|
|
|
|
|
Script string `json:"script"`
|
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
2022-10-28 10:46:14 +00:00
|
|
|
DBName string `json:"dbName"`
|
2022-09-20 11:12:48 +00:00
|
|
|
URL string `json:"url"`
|
2022-09-22 06:19:49 +00:00
|
|
|
SourceDir string `json:"sourceDir"`
|
2022-10-28 10:46:14 +00:00
|
|
|
KeepLocal bool `json:"keepLocal"`
|
2022-09-20 11:12:48 +00:00
|
|
|
TargetDirID int `json:"targetDirID"`
|
2022-09-29 08:15:59 +00:00
|
|
|
RetainCopies int `json:"retainCopies" validate:"number,min=1"`
|
2022-09-20 11:12:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type CronjobUpdate struct {
|
2022-12-13 10:54:28 +00:00
|
|
|
ID uint `json:"id" validate:"required"`
|
2022-09-20 11:12:48 +00:00
|
|
|
Name string `json:"name" validate:"required"`
|
|
|
|
SpecType string `json:"specType" validate:"required"`
|
|
|
|
Week int `json:"week" validate:"number,max=7,min=1"`
|
|
|
|
Day int `json:"day" validate:"number,max=31,min=1"`
|
|
|
|
Hour int `json:"hour" validate:"number,max=23,min=0"`
|
2022-09-22 06:19:49 +00:00
|
|
|
Minute int `json:"minute" validate:"number,max=59,min=0"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
|
|
|
Script string `json:"script"`
|
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
2022-10-28 10:46:14 +00:00
|
|
|
DBName string `json:"dbName"`
|
2022-09-20 11:12:48 +00:00
|
|
|
URL string `json:"url"`
|
2022-09-22 06:19:49 +00:00
|
|
|
SourceDir string `json:"sourceDir"`
|
2022-10-28 10:46:14 +00:00
|
|
|
KeepLocal bool `json:"keepLocal"`
|
2022-09-22 06:19:49 +00:00
|
|
|
TargetDirID int `json:"targetDirID"`
|
2022-09-29 08:15:59 +00:00
|
|
|
RetainCopies int `json:"retainCopies" validate:"number,min=1"`
|
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"`
|
|
|
|
}
|
|
|
|
|
2022-09-20 11:12:48 +00: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"`
|
|
|
|
|
|
|
|
Script string `json:"script"`
|
|
|
|
Website string `json:"website"`
|
|
|
|
ExclusionRules string `json:"exclusionRules"`
|
2022-10-28 10:46:14 +00:00
|
|
|
DBName string `json:"dbName"`
|
2022-09-20 11:12:48 +00:00
|
|
|
URL string `json:"url"`
|
2022-09-22 06:19:49 +00:00
|
|
|
SourceDir string `json:"sourceDir"`
|
2022-10-28 10:46:14 +00:00
|
|
|
KeepLocal bool `json:"keepLocal"`
|
2022-09-20 11:12:48 +00:00
|
|
|
TargetDir string `json:"targetDir"`
|
|
|
|
TargetDirID int `json:"targetDirID"`
|
2022-09-29 08:15:59 +00:00
|
|
|
RetainCopies int `json:"retainCopies"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2022-09-29 08:15:59 +00:00
|
|
|
LastRecrodTime string `json:"lastRecrodTime"`
|
|
|
|
Status string `json:"status"`
|
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 {
|
|
|
|
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 04:26:23 +00:00
|
|
|
File string `json:"file"`
|
2022-09-23 09:21:27 +00:00
|
|
|
}
|