refactor: update data access layer to use GORM repositories

- Replace SQL-based queries with GORM repository calls
- Update all model interfaces to use repository pattern
- Fix compilation errors in core/model/ files
- Update mocks to match new repository interfaces
- Modify API handlers to use new repository layer
- Maintain backward compatibility with existing interfaces

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-06-30 22:08:08 +12:00
parent bd3f101fb4
commit 0d1cb22044
11 changed files with 524 additions and 204 deletions

View File

@@ -14,6 +14,7 @@ type Model struct {
config types.Config
}
type Interface interface {
UserInterface
OrgInterface
@@ -31,3 +32,4 @@ func NewModel(db db.Datastore, bcrypt util.Bcrypt, config types.Config) *Model {
Instance = model
return model
}