Add type attributes to polymorphic models