Class TicketUIModel

java.lang.Object
com.example.breeze_seas.TicketUIModel

public class TicketUIModel extends Object
TicketUIModel represents a single event "ticket" entry displayed in the Tickets feature UI.

Role: - Lightweight view model used by RecyclerView adapters to render ticket cards. - Presentation model mapped from Firestore-backed ticket data.

Outstanding: - Expand with additional display fields only if the Tickets UI needs them.

  • Constructor Details

    • TicketUIModel

      public TicketUIModel(String eventId, String title, String dateLabel, TicketUIModel.Status status)
      Creates a presentation model for one active ticket card.
      Parameters:
      eventId - Firestore event identifier for the related event.
      title - Event title shown on the card.
      dateLabel - Human-readable date string shown on the card.
      status - Active-ticket state that drives the chip and click behavior.
    • TicketUIModel

      public TicketUIModel(String eventId, String title, String dateLabel, TicketUIModel.Status status, boolean privateEvent)
      Creates a presentation model for one active ticket card.
      Parameters:
      eventId - Firestore event identifier for the related event.
      title - Event title shown on the card.
      dateLabel - Human-readable date string shown on the card.
      status - Active-ticket state that drives the chip and click behavior.
      privateEvent - Whether the related event is private.
    • TicketUIModel

      public TicketUIModel(String eventId, String title, String dateLabel, TicketUIModel.Status status, boolean privateEvent, boolean inboxDecisionRequired)
      Creates a presentation model for one active ticket card.
      Parameters:
      eventId - Firestore event identifier for the related event.
      title - Event title shown on the card.
      dateLabel - Human-readable date string shown on the card.
      status - Active-ticket state that drives the chip and click behavior.
      privateEvent - Whether the related event is private.
      inboxDecisionRequired - Whether the entrant must go through Notifications to respond.
    • TicketUIModel

      public TicketUIModel(String eventId, String title, String dateLabel, TicketUIModel.Status status, boolean privateEvent, boolean inboxDecisionRequired, @Nullable String imageDocId)
      Creates a presentation model for one active ticket card.
      Parameters:
      eventId - Firestore event identifier for the related event.
      title - Event title shown on the card.
      dateLabel - Human-readable date string shown on the card.
      status - Active-ticket state that drives the chip and click behavior.
      privateEvent - Whether the related event is private.
      inboxDecisionRequired - Whether the entrant must go through Notifications to respond.
      imageDocId - Optional image document id for the event poster.
  • Method Details

    • getEventId

      public String getEventId()
      Returns:
      Firestore event id for the related event document.
    • getTitle

      public String getTitle()
      Returns:
      Event title shown on the ticket card.
    • getDateLabel

      public String getDateLabel()
      Returns:
      Human-readable date label (e.g., "Mon, Mar 4 • 6:00 PM").
    • getStatus

      public TicketUIModel.Status getStatus()
      Returns:
      Ticket status used to drive chip text and click behavior.
    • isPrivateEvent

      public boolean isPrivateEvent()
      Returns:
      true when the related event is private.
    • isPrivateInvitePending

      public boolean isPrivateInvitePending()
      Returns:
      true when this card is still a private invite awaiting accept/decline.
    • requiresInboxDecision

      public boolean requiresInboxDecision()
      Returns:
      true when this card is still a private invite awaiting accept/decline.
    • getImageDocId

      @Nullable public String getImageDocId()
      Returns:
      Optional image document id for the related event poster.