sys_file_job.go 789 B

123456789101112131415161718192021222324252627
  1. package system
  2. import (
  3. "go_server/model/common"
  4. )
  5. type FileJob struct {
  6. common.GormFullModel
  7. Path string `json:"path" gorm:"column:path;type:varchar(255);comment:数据文件路径"`
  8. Total int64 `json:"total" gorm:"comment:数据量"`
  9. Size string `json:"size" gorm:"type:varchar(80);comment:数据大小"`
  10. Status int `json:"status" gorm:"comment:任务状态:1=执行中 2=执行完成 3=执行失败"`
  11. Desc string `json:"desc" gorm:"type:varchar(512);comment:错误信息"`
  12. CreateBy string `json:"createBy" gorm:"type:varchar(80);comment:任务创建者"`
  13. }
  14. func (*FileJob) TableName() string {
  15. return common.ModelPrefix + "file_job"
  16. }
  17. func (*FileJob) Comment() string {
  18. return "文件导出任务"
  19. }
  20. func NewFileJob() *FileJob {
  21. return &FileJob{}
  22. }