include "schema.fbs";

namespace dgs;

table AttributeRecordRep {
  attr_type:int16(key);
  value_type:AttributeValueTypeRep;
  value_bytes:[byte];
}

table VertexRecordRep {
  vtype:int32;
  vid:int64;
  attributes:[AttributeRecordRep];
}

table EdgeRecordRep {
  etype:int16;
  src_vtype:int32;
  dst_vtype:int32;
  src_id:int64;
  dst_id:int64;
  attributes:[AttributeRecordRep];
}

union RecordUnionRep {
  VertexRecordRep,
  EdgeRecordRep
}

table RecordRep {
  record:RecordUnionRep;
}

table RecordBatchRep {
  records:[RecordRep];
  partition:uint32;
}
