transfer.go 981 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package model
  2. import "go-common/library/time"
  3. // all variable used in dm transfer
  4. const (
  5. TransferJobStateAll = int8(-1)
  6. TransferJobStatInit = int8(0)
  7. TransferJobStatFinished = int8(1)
  8. TransferJobStatFailed = int8(2)
  9. TransferJobStatTransfing = int8(3)
  10. )
  11. // TransList transfer list info
  12. type TransList struct {
  13. ID int64 `json:"id"` //弹幕转移ID
  14. From int64 `json:"from"` //来源Cid
  15. To int64 `json:"to"` //目标Cid
  16. State int64 `json:"state"` //弹幕转移状态
  17. Title string `json:"title"` //来源稿件标题
  18. Ctime time.Time `json:"ctime"` //转移开始时间
  19. }
  20. // TransListRes return transfer list and page info
  21. type TransListRes struct {
  22. Result []*TransList `json:"result"`
  23. Page *PageInfo `json:"page"`
  24. }
  25. // TransferJobInfo dm transfer info
  26. type TransferJobInfo struct {
  27. ID int64
  28. FromCID int64
  29. ToCID int64
  30. MID int64
  31. Offset float64
  32. State int8
  33. Ctime time.Time
  34. Mtime time.Time
  35. }