syntax = "proto2";

package maps_adv.geosmb.telegraphist.proto.notifications;

import "maps_adv/geosmb/telegraphist/proto/v2/common.proto";


message Notification {
    required Recipient recipient = 1;
    repeated common.Transport transports = 2;
    oneof notification_details {
        OrderCreated order_created = 10;
        OrderReminder order_reminder = 11;
        OrderChanged order_changed = 12;
        OrderCancelled order_cancelled = 13;
    }
}

message Recipient {
    required uint64 client_id = 1;
    required uint64 biz_id = 2;

    optional string device_id = 3;
    optional uint64 passport_uid = 4;
    optional uint64 phone = 5;
    optional string email = 6;
}

message OrderCreated {
    required Order order = 1;
    optional string details_link = 2;
}

message OrderReminder {
    required Order order = 1;
    optional string details_link = 2;
}

message OrderChanged {
    required Order order = 1;
    optional string details_link = 2;
}

message OrderCancelled {
    required Order order = 1;
    optional string details_link = 2;
}

message Order {
    required string booking_code = 1;
    repeated common.OrderItem items = 2;
    required common.Cost total_cost = 3;
}
