blog/internal/repository/text_content_repository.go

24 lines
503 B
Go

package repository
import (
"Blog/bootstrap"
"Blog/internal/consts"
"Blog/internal/model"
)
var TextContentRepository *textContentRepository = newTextContentRepository()
type textContentRepository struct {
*baseRep[model.BlogTextContent]
}
func newTextContentRepository() *textContentRepository {
return &textContentRepository{
&baseRep[model.BlogTextContent]{
DB: bootstrap.BlogDB.Gorm,
Mutex: bootstrap.BlogDB.Mutex,
TableName: consts.TABLE_BLOG_TEXT_CONTENT,
},
}
}