2022-09-20 11:12:48 +00:00
|
|
|
package model
|
|
|
|
|
2022-09-23 09:21:27 +00:00
|
|
|
import "time"
|
|
|
|
|
2022-09-20 11:12:48 +00:00
|
|
|
type Cronjob struct {
|
|
|
|
BaseModel
|
|
|
|
|
2022-09-29 03:13:05 +00:00
|
|
|
Name string `gorm:"type:varchar(64);not null;unique" json:"name"`
|
2022-09-20 11:12:48 +00:00
|
|
|
Type string `gorm:"type:varchar(64);not null" json:"type"`
|
|
|
|
SpecType string `gorm:"type:varchar(64);not null" json:"specType"`
|
|
|
|
Spec string `gorm:"type:varchar(64);not null" json:"spec"`
|
|
|
|
Week uint64 `gorm:"type:decimal" json:"week"`
|
|
|
|
Day uint64 `gorm:"type:decimal" json:"day"`
|
|
|
|
Hour uint64 `gorm:"type:decimal" json:"hour"`
|
|
|
|
Minute uint64 `gorm:"type:decimal" json:"minute"`
|
2023-05-24 10:36:41 +00:00
|
|
|
Second uint64 `gorm:"type:decimal" json:"second"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
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"`
|
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
|
|
|
|
|
|
|
KeepLocal bool `gorm:"type:varchar(64)" json:"keepLocal"`
|
|
|
|
TargetDirID uint64 `gorm:"type:decimal" json:"targetDirID"`
|
|
|
|
RetainCopies uint64 `gorm:"type:decimal" json:"retainCopies"`
|
2022-09-20 11:12:48 +00:00
|
|
|
|
2022-09-23 09:21:27 +00:00
|
|
|
Status string `gorm:"type:varchar(64)" json:"status"`
|
|
|
|
EntryID uint64 `gorm:"type:decimal" json:"entryID"`
|
|
|
|
Records []JobRecords `json:"records"`
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|