package com.example.cuida.ui.schedule;

import java.util.Objects;

public class TimeSlot {
    private String time;
    private boolean isBooked;
    private boolean isSelected;

    public TimeSlot(String time, boolean isBooked, boolean isSelected) {
        this.time = time;
        this.isBooked = isBooked;
        this.isSelected = isSelected;
    }

    public String getTime() {
        return time;
    }

    public boolean isBooked() {
        return isBooked;
    }

    public void setBooked(boolean booked) {
        isBooked = booked;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        TimeSlot timeSlot = (TimeSlot) o;
        return isBooked == timeSlot.isBooked &&
                isSelected == timeSlot.isSelected &&
                Objects.equals(time, timeSlot.time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(time, isBooked, isSelected);
    }
}
