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

@@ -10,6 +10,31 @@ type Datastore struct {
mock.Mock
}
// DeleteBudget implements db.Datastore.
func (_m *Datastore) DeleteBudget(string) error {
panic("unimplemented")
}
// GetBudget implements db.Datastore.
func (_m *Datastore) GetBudget(string) (*types.Budget, error) {
panic("unimplemented")
}
// GetUserByEmailVerifyCode implements db.Datastore.
func (_m *Datastore) GetUserByEmailVerifyCode(string) (*types.User, error) {
panic("unimplemented")
}
// InsertAndReplaceBudget implements db.Datastore.
func (_m *Datastore) InsertAndReplaceBudget(*types.Budget) error {
panic("unimplemented")
}
// Ping implements db.Datastore.
func (_m *Datastore) Ping() error {
panic("unimplemented")
}
// AcceptInvite provides a mock function with given fields: _a0, _a1
func (_m *Datastore) AcceptInvite(_a0 *types.Invite, _a1 string) error {
ret := _m.Called(_a0, _a1)