This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type BookshelfHandler struct {
|
||||
ArticleHandler *ArticleHandler
|
||||
BookshelfPublisherHandler *BookshelfPublisherHandler
|
||||
BookHandler *BookHandler
|
||||
AuthorHandler *AuthorHandler
|
||||
ArticleAuthorHandler *ArticleAuthorHandler
|
||||
BookAuthorHandler *BookAuthorHandler
|
||||
}
|
||||
|
||||
func NewBookshelfHandler(db *gorm.DB) *BookshelfHandler {
|
||||
bookshelfHandler := &BookshelfHandler{
|
||||
ArticleHandler: NewArticleHandler(db),
|
||||
BookshelfPublisherHandler: NewBookshelfPublisherHandler(db),
|
||||
BookHandler: NewBookHandler(db),
|
||||
AuthorHandler: NewAuthorHandler(db),
|
||||
ArticleAuthorHandler: NewArticleAuthorHandler(db),
|
||||
BookAuthorHandler: NewBookAuthorHandler(db),
|
||||
}
|
||||
return bookshelfHandler
|
||||
}
|
||||
Reference in New Issue
Block a user