task_info.go 886 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package upcrmmodel
  2. import (
  3. "github.com/siddontang/go-mysql/mysql"
  4. "go-common/library/time"
  5. )
  6. const (
  7. //TaskStateStart 0
  8. TaskStateStart = 0
  9. //TaskStateFinish 1
  10. TaskStateFinish = 1
  11. //TaskStateError 2
  12. TaskStateError = 2
  13. )
  14. const (
  15. //TaskTypeCreditDaily 1
  16. TaskTypeCreditDaily = 1
  17. //TaskTypeScoreSectionDaily 2
  18. TaskTypeScoreSectionDaily = 2
  19. //TaskTypeSignTaskCalculate 3
  20. TaskTypeSignTaskCalculate = 3
  21. //TaskTypeSignCheckDue 4
  22. TaskTypeSignCheckDue = 4
  23. )
  24. var (
  25. //TimeFmtMysql mysql time format
  26. TimeFmtMysql = mysql.TimeFormat
  27. //TimeFmtDate with only date
  28. TimeFmtDate = "2006-01-02"
  29. )
  30. //TaskInfo struct
  31. type TaskInfo struct {
  32. ID uint32 `gorm:"column:id"`
  33. GenerateDate string
  34. TaskType int8
  35. StartTime time.Time
  36. EndTime time.Time
  37. TaskState int16
  38. CTime time.Time `gorm:"column:ctime"`
  39. MTime time.Time `gorm:"column:mtime"`
  40. }