java.lang.Object
com.ntu.fdae.group1.bto.models.enquiry.Enquiry

public class Enquiry extends Object
Represents a customer enquiry in the BTO system.

This class models enquiries submitted by users seeking information or assistance about BTO projects or the application process. Each enquiry tracks its submission details, content, and any replies provided by HDB staff.

  • Constructor Details

    • Enquiry

      public Enquiry(String enquiryId, String userNric, String projectId, String content, LocalDate submissionDate)
      Constructs a new Enquiry with the specified details.
      Parameters:
      enquiryId - Unique identifier for this enquiry
      userNric - NRIC of the user submitting the enquiry
      projectId - ID of the related project, or null for general enquiries
      content - The content or question of the enquiry
      submissionDate - Date when the enquiry was submitted
  • Method Details

    • getEnquiryId

      public String getEnquiryId()
      Gets the unique identifier for this enquiry.
      Returns:
      The enquiry ID
    • getUserNric

      public String getUserNric()
      Gets the NRIC of the user who submitted this enquiry.
      Returns:
      The user's NRIC
    • getProjectId

      public String getProjectId()
      Gets the ID of the project this enquiry is related to.
      Returns:
      The project ID, or null if this is a general enquiry
    • getContent

      public String getContent()
      Gets the content or question of this enquiry.
      Returns:
      The enquiry content
    • setContent

      public void setContent(String content)
      Updates the content of this enquiry.
      Parameters:
      content - The new content to set
    • getReply

      public String getReply()
      Gets the reply provided by HDB staff.
      Returns:
      The reply text, or null if no reply has been provided
    • isReplied

      public boolean isReplied()
      Checks if this enquiry has been replied to.
      Returns:
      true if a reply has been provided, false otherwise
    • getSubmissionDate

      public LocalDate getSubmissionDate()
      Gets the date when this enquiry was submitted.
      Returns:
      The submission date
    • getReplyDate

      public LocalDate getReplyDate()
      Gets the date when a reply was provided.
      Returns:
      The reply date, or null if no reply has been provided
    • addReply

      public void addReply(String replyContent, LocalDate replyDate)
      Adds a reply to this enquiry.

      When a reply is added, the enquiry is marked as replied and the reply date is recorded.

      Parameters:
      replyContent - The content of the reply
      replyDate - The date when the reply was provided
    • editContent

      public void editContent(String newContent)
      Edits the content of this enquiry.

      This is an alternative method to setContent() with a more descriptive name.

      Parameters:
      newContent - The new content to set