My question is regarding the nuts and bolts of a question posed (and answered abstractly) on Stack Exchange here (first post, so I can’t include link):
Should I continue to rely on code generation to generate my models and CRUD?
(question id: 9901057)
Some options:
-
If I have a table named “User”, do I just create an extending model called “MyUser” and generate CRUD for that? What if I still want “user” in my url’s instead of “myuser”?
-
Do I modify Gii to write my models as "Base<ModelName>" so that table "User" generates a model called "BaseUser"? Alongside this would be my custom "class User extends BaseUser", but the Gii-generated CRUD code still references "User" so everything will magically work with my custom class?
-
Is there some other Yii-/Gii-specifc magic that I’m missing here?
My search-fu is bad, so while the above StackExchange link described my problem in my context, implementation details were light or non-existent in that and other links, which makes me think I’m unaware of a more fundamental software engineering thing whose implementation is known to everyone else.