syntax = "proto2";

package maps_adv.adv_store.proto.campaign_list;

import "google/protobuf/timestamp.proto";
import "maps_adv/adv_store/api/proto/billing.proto";
import "maps_adv/adv_store/api/proto/campaign_status.proto";
import "maps_adv/adv_store/api/proto/campaign.proto";
import "maps_adv/common/proto/campaign.proto";

message CampaignList {
    repeated CampaignListItem campaigns = 1;
}

message CampaignListItem {
    required uint64 id = 1;
    required string name = 2;
    required string timezone = 3;
    required google.protobuf.Timestamp start_datetime = 4;
    required google.protobuf.Timestamp end_datetime = 5;
    required campaign_status.CampaignStatus.Enum status = 6;
    optional billing.Money budget = 7;
    repeated campaign.PublicationEnv.Enum publication_envs = 8;
    optional google.protobuf.Timestamp datatesting_expires_at = 9;
}

message ShortCampaignList {
    repeated ShortCampaign campaigns = 1;
}

message ShortCampaign {
    required uint64 id = 1;
    required string name = 2;
    oneof order {
        uint64 order_id = 3;
        uint64 manul_order_id = 4;
    }
}

message CampaignModerationInfo {
    required uint64 id = 1;
    required string name = 2;
    required maps_adv.common.proto.campaign.CampaignType.Enum campaign_type = 3;
    oneof order {
        uint64 order_id = 4;
        uint64 manul_order_id = 5;
    }
    required google.protobuf.Timestamp start_datetime = 6;
    required google.protobuf.Timestamp end_datetime = 7;
    optional billing.Money budget = 8;
    required string timezone = 9;
    required google.protobuf.Timestamp request_datetime = 10;
    repeated campaign.Platform.Enum platforms = 11;
}

message CampaignModerationInfoList {
    repeated CampaignModerationInfo campaigns = 1;
}

message CampaignBudgetAnalysisData {
    required uint64 id = 1;
    required billing.Money budget = 2;
    required billing.Money daily_budget = 3;
    required uint32 days_left = 4;
}

message CampaignBudgetAnalysisList {
    repeated CampaignBudgetAnalysisData campaigns = 1;
}

message CampaignIdList {
    repeated uint64 ids = 1;
}

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

message CampaignDataForMonitoringsList {
    repeated CampaignDataForMonitorings campaigns = 1;
}
