appointments-software / src / main / java / odera / projects / appointmentssoftware / models / Appointment.java
Appointment.java
Raw
package odera.projects.appointmentssoftware.models;

import javax.persistence.*;

@Entity
@Table(name = "appointments")
public class Appointment {
    @Id //primary key
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long appointmentId;

    private int date;

    private int time;

    private String firstName;

    private String lastName;

    private long phone;

    private String email;

    private long userId;

    private boolean confirmed;

    public Appointment() {
    }

    public Appointment(int date, int timme, String firstName, String lastName, long phone, String email, long userId) {
        this.date = date;
        this.time = timme;
        this.firstName = firstName;
        this.lastName = lastName;
        this.phone = phone;
        this.email = email;
        this.userId = userId;
    }

    public boolean isConfirmed() {
        return confirmed;
    }

    public void setConfirmed(boolean confirmed) {
        this.confirmed = confirmed;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getAppointmentId() {
        return appointmentId;
    }

    public void setAppointmentId(long appointmentId) {
        this.appointmentId = appointmentId;
    }

    public int getDate() {
        return date;
    }

    public void setDate(int date) {
        this.date = date;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public long getPhone() {
        return phone;
    }

    public void setPhone(long phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}