blog/internal/repository/text_content_repository.go

26 lines
504 B
Go

package repository
import (
"Blog/internal/client"
"Blog/internal/consts"
"Blog/internal/model"
)
var textContentRep *textContentRepository
func TextContentRepository() *textContentRepository {
if textContentRep == nil {
textContentRep = &textContentRepository{
&BaseRep[model.BlogTextContent]{
DB: client.BlogGormClient(),
TableName: consts.TABLE_BLOG_TEXT_CONTENT,
},
}
}
return textContentRep
}
type textContentRepository struct {
*BaseRep[model.BlogTextContent]
}