meta.proto 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. syntax = "proto3";
  2. message GridMeta {
  3. string grid_id = 1;
  4. repeated FieldMeta fields = 2;
  5. repeated GridBlock blocks = 3;
  6. }
  7. message GridBlock {
  8. string id = 1;
  9. int32 start_row_index = 2;
  10. int32 row_count = 3;
  11. }
  12. message GridBlockMeta {
  13. string block_id = 1;
  14. repeated RowMeta rows = 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 row_id = 1;
  59. string field_id = 2;
  60. oneof one_of_data { string data = 3; };
  61. }
  62. message BuildGridContext {
  63. repeated FieldMeta field_metas = 1;
  64. GridBlock grid_block = 2;
  65. GridBlockMeta grid_block_meta = 3;
  66. }
  67. enum FieldType {
  68. RichText = 0;
  69. Number = 1;
  70. DateTime = 2;
  71. SingleSelect = 3;
  72. MultiSelect = 4;
  73. Checkbox = 5;
  74. }