syntax = "proto3";

package entitlement_badge;

option go_package = "entitlement_badge";

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

// EntitlementBadgeDelete triggers when a user's badge entitlement is expired or otherwise removed.
message EntitlementBadgeDelete {
  option (eventbus.owner.ldap_group) = "team-commerce";
  // Entitlement ID
  string id = 1;
  // Twitch User ID of the user who owns this entitlement.
  string owner_user_id = 2;
  // The feature the entitlement came from.
  Source source = 3;
  // ID for the badge the user is entitled for.
  string item_id = 4;
  // Twitch User ID of the broadcaster who created and owns this badge.
  string badge_owner_user_id = 5;
  // Identifier for the origin object that caused this entitlement.
  // It is a reference to the broader context mostly used for deletion/modifications of entitlements that came from the same context.
  string origin_id = 6;
  // When the entitlement starts.
  google.protobuf.Timestamp starts_at = 7;
  // When the entitlement expires.
  google.protobuf.Timestamp ends_at = 8;
  // Entitlement type is an additional logical grouping of badges.
  string type = 9;
}
