DTO generation creates DTO classes based on entity classes, usually including:
| DTO | Purpose |
|---|---|
| ItemDto | List element |
| DetailDto | Details of an entity |
| FilterDto | Request filter condition model |
| AddDto | Model for adding |
| UpdateDto | Model for updating |
DTOs will be generated in the corresponding module directory.
Support Methods: Studio and MCP
DTOs globally ignore the following properties:
[JsonIgnore] attributeJsonDocument or byte[]For each type of DTO, properties are filtered and processed according to specific usage scenarios. The detailed rules are as follows:
List elements will not include the following properties:
Detail Dto does not include the following properties:
JsonDocument and byte[]FilterDto generation content is as follows:
Add model generation content is as follows:
set method.property name + Id to representUpdate model generation content is the same as add model, but all properties of the update model are nullable by default.
Nullable properties mean that if the field is null, the update will ignore the field to achieve partial updates.
ĺ 厚大纲