Problems with the data model

I am a phper, who encountered a problem during the development process.
the pattern we developed is MVC. The model layer, that is, object-relational mapping, is used. A project generally has several modules, such as: user module, permissions module.
obviously, both the user module and the permissions module use the user table. So is it better for me to build a separate model in each module or to share a model?

Php
Mar.31,2021

generally speaking, this is a very contradictory place. On the one hand, we emphasize modularization, one module is well written, and other businesses are called. This is very convenient, and it can also reduce the amount of code and improve efficiency, but doing so will form a high coupling and start the whole body. At this point, it depends on your business logic. If your business rarely changes after it has been developed, at least not overturning the underlying rewriting, then high coupling, writing it into a model and calling it uniformly. If your modules themselves are in conflict, or if your leadership is fickle and do it again every day, then you can only reduce the coupling and write model separately


. There is no doubt that the whole must be independent. Depending on your business requirements, you can call each other last time, and orm can use associated design

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaf9c6-2268.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaf9c6-2268.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?