meta.proto 2.0 KB

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