syntax = "proto3";

package pagerino.common;
option go_package = "server/app_comm/api/common;api_common";


import "google/protobuf/timestamp.proto";

// For custom logic responses
enum RequestCode {
    UNKNOWN = 0;
    OK = 1;
    UNAUTHORIZED = 2;
    NO_DATA = 3;
    INTERNAL_ERROR = 4;
}

// === DB indexing
message StrIndex {
  oneof id {
    int32 num = 1; // Database ID
    string name = 2; // for external fields: username, euid, name...
  }
}

message Index {
  int32 num = 1; // Database ID
}

// === DB information
message Meta {
  int32 id = 1;
  google.protobuf.Timestamp created_at = 2;
}

message References {
    int32 page = 1; // 32 IDs per page from most recent
    repeated int32 ref_id = 2;
}

message Reference {
    int32 ref_id = 1;
}

message Activity {
    google.protobuf.Timestamp last_online = 1;
}
