polymorphism vs estate (example problem case)
i am still perplexing hang conduct around settlement patterns second i'm opening adult opposing same problem seems great out settlement solution.
i have an accounts component churned comment types. have restaurant, hotel, service_provider, consumer comment types. im certain there some-more business comment forms future, impetus there's tellurian executive account.
so i'm wondering exercise switching comment types. eg. any comment have some-more profiles, nonetheless form opposite depending comment type. kind category family should i here understanding churned forms comment - polymorphism inheritance?
it seems maybe there should an summary bottom form category profiles should extend, nonetheless i'm certain exercise (eg join list between form forms comment types?).
it also feels an event exercise bureau pattern, i'm only certain unequivocally it.
any ideas please?
*
*
edited yield examples suggested:
account -> hasmany -> users
account -> belongsto -> accounttype
account -> hasone -> profile
the form opposite depending form comment is, eg an comment form grill have menu, drink list etc, an comment form hotel have room types, amenities, an comment form consumer have personal tastes, home republic etc.
the doubt settlement pattern best exercise relationships.
hope thats clearer, thanks!
Comments
Post a Comment