view.proto 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. syntax = "proto3";
  2. message View {
  3. string id = 1;
  4. string belong_to_id = 2;
  5. string name = 3;
  6. string desc = 4;
  7. ViewDataType data_type = 5;
  8. int64 version = 6;
  9. RepeatedView belongings = 7;
  10. int64 modified_time = 8;
  11. int64 create_time = 9;
  12. string ext_data = 10;
  13. string thumbnail = 11;
  14. int32 plugin_type = 12;
  15. }
  16. message RepeatedView {
  17. repeated View items = 1;
  18. }
  19. message CreateViewPayload {
  20. string belong_to_id = 1;
  21. string name = 2;
  22. string desc = 3;
  23. oneof one_of_thumbnail { string thumbnail = 4; };
  24. ViewDataType data_type = 5;
  25. int32 plugin_type = 6;
  26. string data = 7;
  27. }
  28. message CreateViewParams {
  29. string belong_to_id = 1;
  30. string name = 2;
  31. string desc = 3;
  32. string thumbnail = 4;
  33. ViewDataType data_type = 5;
  34. string view_id = 6;
  35. string data = 7;
  36. int32 plugin_type = 8;
  37. }
  38. message ViewId {
  39. string value = 1;
  40. }
  41. message RepeatedViewId {
  42. repeated string items = 1;
  43. }
  44. message UpdateViewPayload {
  45. string view_id = 1;
  46. oneof one_of_name { string name = 2; };
  47. oneof one_of_desc { string desc = 3; };
  48. oneof one_of_thumbnail { string thumbnail = 4; };
  49. }
  50. message UpdateViewParams {
  51. string view_id = 1;
  52. oneof one_of_name { string name = 2; };
  53. oneof one_of_desc { string desc = 3; };
  54. oneof one_of_thumbnail { string thumbnail = 4; };
  55. }
  56. enum ViewDataType {
  57. TextBlock = 0;
  58. Grid = 1;
  59. }