In the actual project development process, we often encounter such a problem: the database table fields are named by the underscore method is designed, next is to create the table corresponding to the model class. If we follow the fields in the database table and then manually hit them again, the properties of the corresponding model class are generated. There seems to be nothing to manually create the model class in the case of fewer fields. If the field is more, it's a little time-consuming. So how do you quickly generate a model class for a database table field? Here are my solutions:
1. Copy the build statement to a text editor, such as Notepad++,editplus,vim.
2. Culling other strings, extracting fields
Click Replace All
3. Underline method of turning hump method
Click Replace All
4. Finally, depending on the actual situation, modify the type of the property and generate its Getter/setter method.
Use of the "original" text tool--quickly generate the Model class attribute for the table based on the database field