refactor: updated store to use squirrel for complex querries

This commit is contained in:
2025-07-20 18:05:35 +01:00
parent 189534031b
commit 57730270a0
3 changed files with 161 additions and 11 deletions
+10
View File
@@ -28,6 +28,11 @@ func (m *MockUserStore) Activate(ctx context.Context, token string) error {
return args.Error(0)
}
func (m *MockUserStore) GetAll(ctx context.Context, userID int64, roleLevel int64) ([]*User, error) {
args := m.Called(userID, roleLevel)
return nil, args.Error(1)
}
func (m *MockUserStore) GetByID(ctx context.Context, id int64) (*User, error) {
args := m.Called(id)
return nil, args.Error(1)
@@ -53,6 +58,11 @@ func (m *MockUserStore) PasswordResetRequest(ctx context.Context, userID int64,
return args.Error(0)
}
func (m *MockUserStore) ResetPassword(ctx context.Context, token string, password string) error {
args := m.Called(ctx, token, password)
return args.Error(0)
}
func (m *MockUserStore) Delete(ctx context.Context, id int64) error {
args := m.Called(id)
return args.Error(0)