package de.votian.services.entity;

import java.io.Serializable;
import java.util.Objects;

public class EmployeeRightsId implements Serializable {

    private Long employeeId;
    private Long headquartersId;
    private Long rightId;

    public EmployeeRightsId() {}

    public EmployeeRightsId(Long employeeId, Long headquartersId, Long rightId) {
        this.employeeId = employeeId;
        this.headquartersId = headquartersId;
        this.rightId = rightId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EmployeeRightsId that = (EmployeeRightsId) o;
        return Objects.equals(employeeId, that.employeeId)
                && Objects.equals(headquartersId, that.headquartersId)
                && Objects.equals(rightId, that.rightId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(employeeId, headquartersId, rightId);
    }
}
