summaryrefslogtreecommitdiff
path: root/table.proto
blob: ed7a1a8ef48acedc4d7bcc480e587645848f7c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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 StringCol {
        Widget                               header         = 1;
        repeated string                      vals           = 2;
        repeated Widget                      widgets        = 3;
}

message ButtonCol {
        Widget                               header         = 1;
        repeated string                      vals           = 2;
        repeated Widget                      widgets        = 3;
}

message IntCol {
        Widget                               header         = 1;
        repeated int64                       vals           = 2;
        repeated Widget                      widgets        = 3;
}

message TimeCol {
        Widget                               header         = 1;
        repeated google.protobuf.Timestamp   vals           = 2;
        repeated Widget                      widgets        = 3;
}

message BoolCol {
        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 StringCol                   stringCols     = 6;
        repeated IntCol                      intCols        = 7;
        repeated TimeCol                     timeCols       = 8;
        repeated BoolCol                     boolCols       = 9;
        repeated ButtonCol                   buttonCols     = 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;
}