Add equals and hashcode to pin