job.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package model
  2. const (
  3. // type
  4. FieldFav = "folder"
  5. FieldArc = "video"
  6. FieldResource = "resource"
  7. // action
  8. ActionAdd = "add"
  9. ActionDel = "del"
  10. ActionMove = "move"
  11. ActionCopy = "copy"
  12. ActionMdel = "mdel"
  13. ActionIndef = "indef"
  14. ActionIncol = "incol"
  15. ActionClean = "clean"
  16. ActionInitRelationFids = "initRelationFids"
  17. ActionInitFolderRelations = "initFolderRelations"
  18. ActionInitAllFolderRelations = "initAllFolderRelations"
  19. ActionMultiAdd = "multiAdd"
  20. ActionMultiDel = "multiDel"
  21. ActionFolderAdd = "folderAdd"
  22. ActionFolderDel = "folderDel"
  23. ActionSortFavs = "sortFavs"
  24. )
  25. type Message struct {
  26. Field string `json:"field,omitempty"`
  27. Action string `json:"action,omitempty"`
  28. Oid int64 `json:"oid,omitempty"`
  29. Otype int8 `json:"otype,omitempty"`
  30. Type int8 `json:"type,omitempty"`
  31. Mid int64 `json:"mid,omitempty"`
  32. OldMid int64 `json:"old_mid,omitempty"`
  33. Fid int64 `json:"fid,omitempty"`
  34. FidState int8 `json:"fid_state,omitempty"`
  35. FolderAttr int32 `json:"folder_attr,omitempty"`
  36. OldFolderAttr int32 `json:"old_folder_attr,omitempty"`
  37. NewFolderAttr int32 `json:"new_folder_attr,omitempty"`
  38. Aid int64 `json:"aid,omitempty"`
  39. OldFid int64 `json:"old_fid,omitempty"`
  40. OldFidState int8 `json:"old_fid_state,omitempty"`
  41. NewFid int64 `json:"new_fid,omitempty"`
  42. NewFidState int8 `json:"new_fid_state,omitempty"`
  43. Affected int64 `json:"affected,omitempty"`
  44. Aids []int64 `json:"aids,omitempty"`
  45. Oids []int64 `json:"oids,omitempty"`
  46. Mids []int64 `json:"mids,omitempty"`
  47. FTime int64 `json:"ftime,omitempty"`
  48. SortFavs []SortFav `json:"sort_favs,omitempty"`
  49. }
  50. type SortFav struct {
  51. Pre *Resource `json:"preID,omitempty"`
  52. Insert *Resource `json:"id,omitempty"`
  53. }