syntax = "proto2";

message Record {
  enum Op {
    PUT = 0;
    DEL = 1;
  }
  required string id = 1;
  required Op op = 2;
  optional string schema = 3;
  optional bytes value = 4;
  optional uint32 timestamp = 5;
  repeated string links = 6;
  // TODO: We need to store the schema version.
  // Enable with next breaking change and have it next to schema.
  // optional uint32 schemaVersion = 7;
}

// The Header is DEP-0007 compatible.
// It is written as the first message to every feed.
// Metadata is currently empty.
message Header {
  required string type = 1;
  optional bytes metadata = 2;
}
