package storage import "gorm.io/gorm" type Storage struct { articleApi ArticleApi providerApi ProviderApi providerArticleApi ProviderArticleApi } func NewStorage(db *gorm.DB) *Storage { return &Storage{ articleApi: &articleApi{ db: db, }, providerApi: NewProviderApi(db), } } func (s *Storage) Article() ArticleApi { return s.articleApi } func (s *Storage) Provider() ProviderApi { return s.providerApi } func (s *Storage) ProviderArticle() ProviderArticleApi { return s.providerArticleApi }