syntax = "proto3";

package creator_goal;

option go_package = "creator_goal";

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

// CreatorGoalCreate triggers when a new goal is created on a channel.
message CreatorGoalCreate {
  option (eventbus.owner.ldap_group) = "team-creator-supers";
  // The id of the goal.
  string id = 1;
  // The user id of the broadcaster who is creating the goal.
  string user_id = 2;
  // The type of goal being created.
  GoalType type = 3;
  // The description of the goal.
  string description = 4;
  // The current amount of contributions at the start of the goal.
  int64 current_amount = 5;
  // The target amount of points at which the goal will be completed.
  int64 target_amount = 6;
  // The timestamp of when the goal was started.
  google.protobuf.Timestamp started_at = 7;
}

// GoalType specifies the various possible goal types available for the creator.
enum GoalType {
  GOAL_TYPE_INVALID = 0;
  // Indicates a goal based on follows points.
  GOAL_TYPE_FOLLOWS_POINTS = 1;
  // Indicates a goal based on subscriptions points.
  GOAL_TYPE_SUBSCRIPTIONS_POINTS = 2;
}
