1. Type selection
1.1 web framework:iris. Reasonable structure, many examples, rich documents.
1.2 orm:gorm. Model struct is generated by xorm.
At present, there are more optimistic https://github.com/facebook/ent It’s not perfect yet.
2. Design specific code structure
3. Code layering
Follow the cqrs principle, repo is responsible for query, and CMD is moved to the lower level models.
4. Implement the interface of commodity details
5. Operation effect