package de.votian.services.entity;

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

public class CustomerServiceAssignmentId implements Serializable {

    private Long customerId;
    private Long serviceId;

    public CustomerServiceAssignmentId() {
    }

    public CustomerServiceAssignmentId(Long customerId, Long serviceId) {
        this.customerId = customerId;
        this.serviceId = serviceId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        CustomerServiceAssignmentId that = (CustomerServiceAssignmentId) o;
        return Objects.equals(customerId, that.customerId) && Objects.equals(serviceId, that.serviceId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(customerId, serviceId);
    }
}
