syntax = "proto3";

package boost_order;

option go_package = "boost_order";

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

// BoostOrderCreate triggers when a Boost Order is created.
message BoostOrderCreate {
  option (eventbus.owner.ldap_group) = "team-ads";
  // The unique identifier of the Boost Order
  string id = 1;
  // The type of Boost Order (whether paid or earned)
  OrderType type = 2;
  // The state of the Boost Order
  OrderState state = 3;
  // The current progress of the Boost Order being fulfilled
  int64 goal_progress = 4;
  // The the total progress required for a Boost Order to be fulfilled
  int64 goal_target = 5;
  // Twitch User ID of who Boost Order was redeemed for
  string boost_owner_id = 6;
  // Twitch User ID Identifier of who made the Boost Order (only applicable for paid)
  string purchaser_id = 7;
  // The total quantity of Boosts within the Boost Order
  int64 quantity = 8;
  // The time at which the Boost Order was created
  google.protobuf.Timestamp opened_at = 9;
}

// OrderType are the different types a Boost Order can be ordered from.
enum OrderType {
  ORDER_TYPE_INVALID = 0;
  ORDER_TYPE_EARNED = 1;
  ORDER_TYPE_PAID = 2;
}

// OrderState is the different type of states an order can be in.
enum OrderState {
  ORDER_STATE_INVALID = 0;
  ORDER_STATE_DELIVERING = 1;
  ORDER_STATE_FULFILLED = 2;
  ORDER_STATE_PENDING = 3;
  ORDER_STATE_CANCELLED = 4;
}
