transfer.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package model
  2. import (
  3. "time"
  4. xtime "go-common/library/time"
  5. )
  6. // all variable used in dm transfer
  7. const (
  8. TransferJobStatInit = int8(0)
  9. TransferJobStatFinished = int8(1)
  10. TransferJobStatFailed = int8(2)
  11. )
  12. // TransferJob dm transfer
  13. type TransferJob struct {
  14. ID int64
  15. FromCID int64
  16. ToCID int64
  17. MID int64
  18. Offset float64
  19. State int8
  20. Ctime time.Time
  21. Mtime time.Time
  22. }
  23. // TransferHistory transfer list item
  24. type TransferHistory struct {
  25. ID int64 `json:"id"`
  26. PartID int32 `json:"part_id"`
  27. CID int64 `json:"cid"`
  28. Title string `json:"title"`
  29. CTime xtime.Time `json:"ctime"`
  30. State int8 `json:"state"`
  31. }
  32. // CidInfo is archive_video model.
  33. type CidInfo struct {
  34. Aid int64 `json:"aid"`
  35. Title string `json:"title"`
  36. Desc string `json:"desc"`
  37. Filename string `json:"filename"`
  38. Index int `json:"index"`
  39. Status int16 `json:"status"`
  40. StatusDesc string `json:"status_desc"`
  41. FailCode int8 `json:"fail_code"`
  42. FailDesc string `json:"fail_desc"`
  43. CTime xtime.Time `json:"ctime"`
  44. }