common/structs/storage/storage.go
2024-08-04 20:46:49 +08:00

20 lines
259 B
Go

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
}