Add equals and hashCode method to Post class