12345678910111213141516171819202122 |
- package model
- import "github.com/jinzhu/gorm"
- // All 导出
- type All struct {
- Product *Product
- Vendor *Vendor
- User *User
- Application *Application
- Protocal *Protocal
- }
- // Init 初始化所有model
- func (a *All) Init(db *gorm.DB) *All {
- a.Product = new(Product).Init(db)
- a.Vendor = new(Vendor).Init(db)
- a.User = new(User).Init(db)
- a.Application = new(Application).Init(db)
- a.Protocal = new(Protocal).Init(db)
- return a
- }
|