The model class state attribute needs to be annotated

There are state attributes in some model objects. These attributes represent different meanings of the objects. Therefore, in the process of development, these "meanings" need to be remarked in the model, which is beneficial for developers to read the code and can quickly familiar business knowledge.


At the same time, in order to improve the readability of the code, it is not possible to directly write a certain state with numbers in the code, so that the developers do not understand what it means, so "static constants" are generally used to record these attributes ( capitalized string identifiers ), It is convenient for unified management of code and enhance the readability of code.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327033815&siteId=291194637