It feels strange. Is the model layer static? In fact, these methods can also be written as class methods, but NEW methods must be added before calling. So it is changed to static. The disadvantage is that if the static method needs to abstract public logic processing, it must also be written as static...
It feels strange. Is the model layer static?
In fact, these methods can also be written as class methods, but NEW methods must be added before calling. So it is changed to static.
The disadvantage is that if the static method needs to abstract public logic processing, it must also be written as static.
I don't feel right. ask someone to help me.
Reply content:
It feels strange. Is the model layer static?
In fact, these methods can also be written as class methods, but NEW methods must be added before calling. So it is changed to static.
The disadvantage is that if the static method needs to abstract public logic processing, it must also be written as static.
I don't feel right. ask someone to help me.
I am also like the landlord, sometimes writing is a static method. In fact, it may be better to create a service layer to encapsulate these operations, rather than writing them in the Model.
NO is not necessarily static.
For example, I have a table (school_user_check) that has a field (uid) associated with the user table (user) to obtain the corresponding user table data:
Write models first
Then call