package com.sourcefellows.patterns.steadystate;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

import java.time.LocalDate;
import java.util.Date;

@Entity
@Table(name = "Attendees")
public class Attendee {

    @Id
    private long id;

    @Column(name = "created_at")
    private LocalDate creationDate;
    @Column(name = "salutation")
    private String salutation;
    @Column(name = "first_name")
    private String firstName;
    @Column(name = "last_name")
    private String lastName;
    @Column(name = "e_mail")
    private String eMail;

    @Override
    public String toString() {
        return "Attendee{" +
                "id=" + id +
                ", Salutation='" + salutation + '\'' +
                ", FirstName='" + firstName + '\'' +
                ", LastName='" + lastName + '\'' +
                ", EMail='" + eMail + '\'' +
                ", Created='" + creationDate + '\'' +
                '}';
    }
}
