Project Specification
2/14/23Less than 1 minute
API Specifications
- For API type naming: Requests end with
Req, responses end withResp, and data objects end withInfo. - It is recommended to add detailed comments for Swagger generation. We support Go Swagger annotations—simply add them to the fields.
- It is recommended to use the
go_zerofilename style, following Golang conventions.
RPC Specifications
- Split and define proto files in the
descfolder. - Use
optionalfor optional fields.
Warning
Goctls will merge the proto files in the desc directory into the root directory. It is normal for individual proto files to report errors in the IDE; the final merged file should not have errors.
Ent Specifications
- All fields should have comments (Comments) for global comment generation.
- It is recommended to manually configure table comments.
- It is not recommended to enable foreign key associations.