syntax = "proto3";

package entitlement_subscription;

option go_package = "entitlement_subscription";

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

// EntitlementSubscriptionDelete triggers when a user's subscription entitlement's expires or is canceled.
// Note that this might represent a canceled future subscription, i.e., a subscription that never started.
message EntitlementSubscriptionDelete {
  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 Platform from which the entitlement came from.
  Platform platform = 3;
  // ID for the product the user is entitled to.
  string product_id = 4;
  // Twitch User ID of the broadcaster who owns the product.
  string product_owner_user_id = 5;
  // Identifier for the origin object that caused this entitlement.
  string origin_id = 6;
  // When the entitlement starts.
  google.protobuf.Timestamp starts_at = 7;
  // When the entitlement expires.
  google.protobuf.Timestamp ends_at = 8;
  // The subscription type of this entitlement.
  SubscriptionType type = 9;
}
