add hat attribute to post entity