syntax = "proto2";

package maps_adv.geosmb.clients.market.proto.common;

message Money
{
    // amount
    required string value = 1;

    // ISO 4217 format currency, e.g. "USD" or "RUB"
    // https://ru.wikipedia.org/wiki/ISO_4217
    required string currency = 2;
}

enum OrderType {
    ASC = 1;
    DESC = 2;
}

message PagingInputParameters {
    required uint64 offset = 1;
    required uint64 limit = 2;
}

message PagingOutputParameters {
    required uint64 offset = 1;
    required uint64 limit = 2;
    required uint64 total = 3;
}

message Error {
    enum ErrorCode {
        UNKNOWN = 0;
        NOT_FOUND = 1;
        BAD_PROTO = 2;
        CONFLICT = 3;
    }
    required ErrorCode code = 1;
    required string message = 2;
}
