2022-09-20 19:12:48 +08:00
|
|
|
package model
|
|
|
|
|
2022-09-23 17:21:27 +08:00
|
|
|
import "time"
|
|
|
|
|
2022-09-20 19:12:48 +08:00
|
|
|
type Cronjob struct {
|
|
|
|
BaseModel
|
|
|
|
|
2022-09-29 11:13:05 +08:00
|
|
|
Name string `gorm:"type:varchar(64);not null;unique" json:"name"`
|
2022-09-20 19:12:48 +08: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 18:36:41 +08:00
|
|
|
Second uint64 `gorm:"type:decimal" json:"second"`
|
2022-09-20 19:12:48 +08:00
|
|
|
|
2023-06-28 14:30:11 +08:00
|
|
|
ContainerName string `gorm:"type:varchar(64)" json:"containerName"`
|
2022-09-20 19:12:48 +08:00
|
|
|
Script string `gorm:"longtext" json:"script"`
|
|
|
|
Website string `gorm:"type:varchar(64)" json:"website"`
|
2022-10-28 18:46:14 +08:00
|
|
|
DBName string `gorm:"type:varchar(64)" json:"dbName"`
|
2022-09-20 19:12:48 +08: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 18:46:14 +08: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 19:12:48 +08:00
|
|
|
|
2022-09-23 17:21:27 +08: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 22:55:10 +08:00
|
|
|
CronjobID uint `gorm:"type:decimal" json:"cronjobID"`
|
2022-09-28 18:11:36 +08: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 18:46:14 +08:00
|
|
|
FromLocal bool `gorm:"type:varchar(64)" json:"source"`
|
|
|
|
File string `gorm:"type:varchar(256)" json:"file"`
|
2022-09-28 18:11:36 +08:00
|
|
|
Status string `gorm:"type:varchar(64)" json:"status"`
|
|
|
|
Message string `gorm:"longtext" json:"message"`
|
2022-09-20 19:12:48 +08:00
|
|
|
}
|