syntax = "proto3";

package pagerino.message;
option go_package = "server/app_comm/api/message;api_message";

import "google/protobuf/timestamp.proto";
import "common.proto";


message MessageBasicInfo {
  int32 sender_id = 1;
  int32 receiver_id = 2;
  string payload = 3;
  google.protobuf.Timestamp created_at = 4;
}

message Payload {
  string payload = 1;
}


service MessageService {
  // === DB information
  rpc GetInfo(common.Index) returns (MessageBasicInfo);
  rpc GetPayload(common.Index) returns (Payload);

  // Common
  rpc GetMeta(common.Index) returns (common.Meta);
}
