24 lines
438 B
Go
24 lines
438 B
Go
package repository
|
|
|
|
import (
|
|
"Blog/bootstrap"
|
|
"Blog/internal/consts"
|
|
"Blog/internal/model"
|
|
)
|
|
|
|
var FileRepository *fileRepository = newFileRepository()
|
|
|
|
type fileRepository struct {
|
|
*baseRep[model.UploadFile]
|
|
}
|
|
|
|
func newFileRepository() *fileRepository {
|
|
return &fileRepository{
|
|
&baseRep[model.UploadFile]{
|
|
DB: bootstrap.FileDB.Gorm,
|
|
Mutex: bootstrap.FileDB.Mutex,
|
|
TableName: consts.TABLE_UPLOAD_FILE,
|
|
},
|
|
}
|
|
}
|