syntax = "proto3";

package ads_creator_incentive_offer_set;

option go_package = "ads_creator_incentive_offer_set";

import "eventbus/owner.proto";
import "google/protobuf/timestamp.proto";

// AdsCreatorIncentiveOfferSetCreate triggers when a new Creator Incentive Offer Set is created.
message AdsCreatorIncentiveOfferSetCreate {
  option (eventbus.owner.ldap_group) = "team-ads";
  // The id represents the unique identifier of the offer set.
  string id = 1;
  // The user_id represents the channel that the offers are presented to.
  string user_id = 2;
  // The campaign_id represents which campaign this offer set belongs to.
  string campaign_id = 3;
  // The selection_period_start_at represents the start time when the user can select the offer.
  google.protobuf.Timestamp selection_period_start_at = 4;
  // The offers represents all the offers in this offer set.
  repeated AdsCreatorIncentiveOffer offers = 5;
}

// AdsCreatorIncentiveOffer represents the offer we present to the user.
message AdsCreatorIncentiveOffer {
  // The id represents the unique identifier of the offer.
  string id = 1;
  // The start_at represents the start time of the offer.
  google.protobuf.Timestamp start_at = 2;
  // The end_at represents the end time of the offer.
  google.protobuf.Timestamp end_at = 3;
  // The requirements represent requirements for users.
  AdsCreatorIncentiveOfferRequirement requirement = 4;
  // The rank reprensents the rank of the offer in the offer set.
  int32 rank = 5;
}

// AdsCreatorIncentiveOfferRequirement represents the requirements the user should commit to in the offer.
message AdsCreatorIncentiveOfferRequirement {
  // The ad_density is the ad density requirement of the offer.
  float ad_density = 1;
  // The hours_broadcast is the hours broadcast requirement of the offer.
  float hours_broadcast = 2;
}
