meta.proto 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. syntax = "proto3";
  2. message GridMeta {
  3. string grid_id = 1;
  4. repeated FieldMeta fields = 2;
  5. repeated GridBlockMeta block_metas = 3;
  6. }
  7. message GridBlockMeta {
  8. string block_id = 1;
  9. int32 start_row_index = 2;
  10. int32 row_count = 3;
  11. }
  12. message GridBlockMetaSerde {
  13. string block_id = 1;
  14. repeated RowMeta row_metas = 2;
  15. }
  16. message FieldMeta {
  17. string id = 1;
  18. string name = 2;
  19. string desc = 3;
  20. FieldType field_type = 4;
  21. bool frozen = 5;
  22. bool visibility = 6;
  23. int32 width = 7;
  24. string type_option = 8;
  25. }
  26. message FieldChangeset {
  27. string field_id = 1;
  28. string grid_id = 2;
  29. oneof one_of_name { string name = 3; };
  30. oneof one_of_desc { string desc = 4; };
  31. oneof one_of_field_type { FieldType field_type = 5; };
  32. oneof one_of_frozen { bool frozen = 6; };
  33. oneof one_of_visibility { bool visibility = 7; };
  34. oneof one_of_width { int32 width = 8; };
  35. oneof one_of_type_options { string type_options = 9; };
  36. }
  37. message AnyData {
  38. string type_id = 1;
  39. bytes value = 2;
  40. }
  41. message RowMeta {
  42. string id = 1;
  43. string block_id = 2;
  44. map<string, CellMeta> cell_by_field_id = 3;
  45. int32 height = 4;
  46. bool visibility = 5;
  47. }
  48. message RowMetaChangeset {
  49. string row_id = 1;
  50. oneof one_of_height { int32 height = 2; };
  51. oneof one_of_visibility { bool visibility = 3; };
  52. map<string, CellMeta> cell_by_field_id = 4;
  53. }
  54. message CellMeta {
  55. string field_id = 1;
  56. string data = 2;
  57. }
  58. message CellMetaChangeset {
  59. string grid_id = 1;
  60. string row_id = 2;
  61. string field_id = 3;
  62. oneof one_of_data { string data = 4; };
  63. }
  64. message BuildGridContext {
  65. repeated FieldMeta field_metas = 1;
  66. GridBlockMeta block_metas = 2;
  67. GridBlockMetaSerde block_meta_data = 3;
  68. }
  69. enum FieldType {
  70. RichText = 0;
  71. Number = 1;
  72. DateTime = 2;
  73. SingleSelect = 3;
  74. MultiSelect = 4;
  75. Checkbox = 5;
  76. }