guipb/table.proto

58 lines
2.3 KiB
Protocol Buffer

syntax = "proto3";
// playing around with ideas here
package gitpb;
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
import "widget.proto"; // Import the well-known type for Timestamp
message StringRow {
Widget header = 1;
repeated string vals = 2;
repeated Widget widgets = 3;
}
message ButtonRow {
Widget header = 1;
repeated string vals = 2;
repeated Widget widgets = 3;
}
message IntRow {
Widget header = 1;
repeated int64 vals = 2;
repeated Widget widgets = 3;
}
message TimeRow {
Widget header = 1;
repeated google.protobuf.Timestamp vals = 2;
repeated Widget widgets = 3;
}
message BoolRow {
Widget header = 1;
repeated Widget widgets = 2;
}
message Table { // `autogenpb:marshal`
string uuid = 1;
string title = 2;
Widget parent = 3;
Widget grid = 4;
repeated string order = 5;
repeated StringRow stringRows = 6;
repeated IntRow intRows = 7;
repeated TimeRow timeRows = 8;
repeated BoolRow boolRows = 9;
repeated ButtonRow buttonRows = 10;
}
message Tables { // `autogenpb:marshal`
string uuid = 1; // `autogenpb:uuid:c328aa62-3c4f-4d00-9244-cc44ae75ab1b`
string version = 2; // `autogenpb:version:v1`
repeated Table Tables = 3;
}