syntax = "proto2";

package maps_adv.statistics.dashboard.proto.campaign_stat;

import "google/protobuf/timestamp.proto";
import "maps_adv/common/proto/campaign.proto";

message CampaignChargedSumInput {
    repeated uint64 campaign_ids = 1;
    optional uint64 on_timestamp = 2;
}

message CampaignChargedSum {
    required uint64 campaign_id = 1;
    required string charged_sum = 3;  // two decimal places
}

message CampaignChargedSumOutput {
    repeated CampaignChargedSum campaigns_charged_sums = 1;  // two decimal places
}

message CampaignEventsInputPart {
    required uint64 campaign_id = 1;
    required maps_adv.common.proto.campaign.CampaignType.Enum campaign_type = 2;
}

message CampaignEventsForPeriodInput {
    repeated CampaignEventsInputPart campaigns = 1;
    optional google.protobuf.Timestamp period_from = 2;
    optional google.protobuf.Timestamp period_to = 3;
}

message CampaignEvents {
    required uint64 campaign_id = 1;
    required uint64 events = 2;
}

message CampaignEventsForPeriodOutput {
    repeated CampaignEvents campaigns_events = 1;
}
