Refactor getHash for pizza model