syntax = "proto3";

package subscriber_badge;

option go_package = "subscriber_badge";

import "eventbus/owner.proto";

// SubscriberBadgeCreate triggers when a user uploads a new subscriber badge.
message SubscriberBadgeCreate {
  option (eventbus.owner.ldap_group) = "team-subs";
  // user_id refers to the creator who uploaded a new subscriber badge.
  string user_id = 1;
  // badge refers to the subscriber badge that was uploaded.
  BadgeAsset badge = 2;
  // is_modified refers to if this badge is a base or modified badge.
  bool is_modified = 3;
  // required_tenure_months refers to the amount of tenure months a user must have to unlock this badge.
  int32 required_tenure_months = 4;
}

// BadgeAsset is the badge related asset uploaded in various sizes.
message BadgeAsset {
  // image_url_1x refers to the url of the 18x18 asset.
  string image_url_1x = 1;
  // image_url_2x refers to the url of the 36x36 asset.
  string image_url_2x = 2;
  // image_url_4x refers to the url of the 72x72 asset.
  string image_url_4x = 3;
}
