syntax = "proto2";

package maps_adv.adv_store.proto.moderation;

import "google/protobuf/timestamp.proto";

import "maps_adv/adv_store/api/proto/billing.proto";
import "maps_adv/adv_store/api/proto/campaign.proto";
import "maps_adv/common/proto/campaign.proto";

message CampaignsModerationInfo {
  repeated CampaignModerationInfo campaigns = 1;
}

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


message CampaignModerationReview {
  enum ReviewResolution {
    APPROVE = 1;
    REJECT = 2;
  }

  required ReviewResolution resolution = 1;
  required uint64 author_id = 2;
  optional string comment = 3;
  optional uint64 campaign_id = 4; // TODO: make required after migration from v1
  repeated uint32 verdicts = 5;
}
