meta.proto 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_options = 8;
  25. }
  26. message FieldChangeset {
  27. string field_id = 1;
  28. oneof one_of_name { string name = 2; };
  29. oneof one_of_desc { string desc = 3; };
  30. oneof one_of_field_type { FieldType field_type = 4; };
  31. oneof one_of_frozen { bool frozen = 5; };
  32. oneof one_of_visibility { bool visibility = 6; };
  33. oneof one_of_width { int32 width = 7; };
  34. oneof one_of_type_options { string type_options = 8; };
  35. }
  36. message AnyData {
  37. string type_id = 1;
  38. bytes value = 2;
  39. }
  40. message RowMeta {
  41. string id = 1;
  42. string block_id = 2;
  43. map<string, CellMeta> cell_by_field_id = 3;
  44. int32 height = 4;
  45. bool visibility = 5;
  46. }
  47. message RowMetaChangeset {
  48. string row_id = 1;
  49. oneof one_of_height { int32 height = 2; };
  50. oneof one_of_visibility { bool visibility = 3; };
  51. map<string, CellMeta> cell_by_field_id = 4;
  52. }
  53. message CellMeta {
  54. string field_id = 1;
  55. string data = 2;
  56. }
  57. message CellMetaChangeset {
  58. string grid_id = 1;
  59. string row_id = 2;
  60. string field_id = 3;
  61. oneof one_of_data { string data = 4; };
  62. }
  63. message BuildGridContext {
  64. repeated FieldMeta field_metas = 1;
  65. GridBlockMeta block_metas = 2;
  66. GridBlockMetaSerde block_meta_data = 3;
  67. }
  68. enum FieldType {
  69. RichText = 0;
  70. Number = 1;
  71. DateTime = 2;
  72. SingleSelect = 3;
  73. MultiSelect = 4;
  74. Checkbox = 5;
  75. }