package de.fete.adapter.out.persistence;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import java.util.UUID;

/** JPA entity mapping to the rsvps table. */
@Entity
@Table(name = "rsvps")
public class RsvpJpaEntity {

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @Column(name = "rsvp_token", nullable = false, unique = true)
  private UUID rsvpToken;

  @Column(name = "event_id", nullable = false)
  private Long eventId;

  @Column(nullable = false, length = 100)
  private String name;

  /** Returns the internal database ID. */
  public Long getId() {
    return id;
  }

  /** Sets the internal database ID. */
  public void setId(Long id) {
    this.id = id;
  }

  /** Returns the RSVP token. */
  public UUID getRsvpToken() {
    return rsvpToken;
  }

  /** Sets the RSVP token. */
  public void setRsvpToken(UUID rsvpToken) {
    this.rsvpToken = rsvpToken;
  }

  /** Returns the event ID. */
  public Long getEventId() {
    return eventId;
  }

  /** Sets the event ID. */
  public void setEventId(Long eventId) {
    this.eventId = eventId;
  }

  /** Returns the guest's display name. */
  public String getName() {
    return name;
  }

  /** Sets the guest's display name. */
  public void setName(String name) {
    this.name = name;
  }
}
