Refactor the orm entity