common/structs/storage/storage.go

20 lines
259 B
Go
Raw Normal View History

2024-08-04 20:46:49 +08:00
package storage
import "gorm.io/gorm"
type Storage struct {
articleApi ArticleApi
}
func NewStorage(db *gorm.DB) *Storage {
return &Storage{
articleApi: &articleApi{
db: db,
},
}
}
func (s *Storage) Article() ArticleApi {
return s.articleApi
}