Add a constructor for the entity