new file structure & koneksi ke DB

This commit is contained in:
mario
2025-05-14 10:23:33 +07:00
parent 8289881df3
commit dd4451c2a8
18 changed files with 753 additions and 243 deletions

View File

@@ -0,0 +1,23 @@
package repository
import (
"devone.aplikasi.web.id/gitea/mario/go-ohif-proxy/internal/database"
"github.com/jmoiron/sqlx"
)
// Repository provides a base interface to the database
type Repository struct {
db *sqlx.DB // Changed from *sql.DB to *sqlx.DB
}
// NewRepository creates a new database repository
func NewRepository() *Repository {
return &Repository{
db: database.DB,
}
}
// Close closes the database connection (no-op as DB is managed by database package)
func (r *Repository) Close() error {
return nil
}