namespace dgs;

enum AttributeValueTypeRep : uint8 {
  INT32 = 0,
  INT32_LIST = 1,
  INT64 = 2,
  INT64_LIST = 3,
  FLOAT32 = 4,
  FLOAT32_LIST = 5,
  FLOAT64 = 6,
  FLOAT64_LIST = 7,
  STRING = 8,
}

table AttributeDefRep {
  type:int16;
  name:string;
  value_type:AttributeValueTypeRep;
}

table VertexDefRep {
  vtype:int32;
  name:string;
  attr_types:[int16];
}

table EdgeDefRep {
  etype:int16;
  name:string;
  attr_types:[int16];
}

table EdgeRelationDefRep {
  etype:int16;
  src_vtype:int32;
  dst_vtype:int32;
}

table SchemaRep {
  attr_defs:[AttributeDefRep];
  vertex_defs:[VertexDefRep];
  edge_defs:[EdgeDefRep];
  edge_relation_defs:[EdgeRelationDefRep];
}

root_type SchemaRep;
