syntax = "proto2";

package maps_adv.manul.proto.orders;

import "google/protobuf/timestamp.proto";


message OrderInput {
    required string title = 1;
    required uint64 client_id = 2;
    required uint64 product_id = 3;
    required CurrencyType currency = 4;
    optional string comment = 5;
    optional RateType rate = 6 [default = PAID];
}

message OrderOutput {
    required uint64 id = 1;
    required string title = 2;
    required google.protobuf.Timestamp created_at = 3;
    required uint64 client_id = 4;
    required uint64 product_id = 5;
    required CurrencyType currency = 6;
    required string comment = 7;
    required RateType rate = 8;
}

message OrdersList {
    repeated OrderOutput orders = 1;
}

message OrdersFilter {
    repeated uint64 ids = 1;
}

message AccountManagerIdFilter {
    required uint64 account_manager_id = 1;
}

enum CurrencyType {
    RUB = 0;
    BYN = 1;
    TRY = 2;
    KZT = 3;
    EUR = 4;
    USD = 5;
}

enum RateType {
    PAID = 0;
    FREE = 1;
}