syntax = "proto2";

package maps_adv.geosmb.telegraphist.proto.common;

import "google/protobuf/timestamp.proto";

message OrderItem {
    required string name = 1;
    required google.protobuf.Timestamp booking_timestamp = 2;
    required string employee_name = 3;
    required Cost cost = 4;
}

message Cost {
    oneof price {
        string final_cost = 1; // like 123.45
        string minimal_cost = 4;  // like 123.45
    }
    optional string cost_before_discounts = 2; // like 123.45
    optional Discount discount = 3;
}


message Discount {
    required string percent = 1; // like 123.45
    required string value = 2; // like 123.45
}

message NotificationResult {
    repeated NotificationTransportResult results = 1;
}

message NotificationTransportResult {
    required Transport transport = 1;
    reserved 2;
    oneof effective_address {
        string device_id = 10;
        uint64 passport_uid = 11;
        uint64 phone = 12;
        string email = 13;
    }
    optional string error = 3;
}

enum Transport {
    SMS = 1;
    EMAIL = 2;
    PUSH = 3;
}
