package mocks import ( "context" "time" "github.com/food-ai/backend/internal/domain/user" ) type MockUserRepository struct { UpsertByFirebaseUIDFn func(ctx context.Context, uid, email, name, avatarURL string) (*user.User, error) GetByIDFn func(ctx context.Context, id string) (*user.User, error) UpdateFn func(ctx context.Context, id string, req user.UpdateProfileRequest) (*user.User, error) UpdateInTxFn func(ctx context.Context, id string, profileReq user.UpdateProfileRequest, caloriesReq *user.UpdateProfileRequest) (*user.User, error) SetRefreshTokenFn func(ctx context.Context, id, token string, expiresAt time.Time) error FindByRefreshTokenFn func(ctx context.Context, token string) (*user.User, error) ClearRefreshTokenFn func(ctx context.Context, id string) error } func (m *MockUserRepository) UpsertByFirebaseUID(ctx context.Context, uid, email, name, avatarURL string) (*user.User, error) { return m.UpsertByFirebaseUIDFn(ctx, uid, email, name, avatarURL) } func (m *MockUserRepository) GetByID(ctx context.Context, id string) (*user.User, error) { return m.GetByIDFn(ctx, id) } func (m *MockUserRepository) Update(ctx context.Context, id string, req user.UpdateProfileRequest) (*user.User, error) { return m.UpdateFn(ctx, id, req) } func (m *MockUserRepository) UpdateInTx(ctx context.Context, id string, profileReq user.UpdateProfileRequest, caloriesReq *user.UpdateProfileRequest) (*user.User, error) { return m.UpdateInTxFn(ctx, id, profileReq, caloriesReq) } func (m *MockUserRepository) SetRefreshToken(ctx context.Context, id, token string, expiresAt time.Time) error { return m.SetRefreshTokenFn(ctx, id, token, expiresAt) } func (m *MockUserRepository) FindByRefreshToken(ctx context.Context, token string) (*user.User, error) { return m.FindByRefreshTokenFn(ctx, token) } func (m *MockUserRepository) ClearRefreshToken(ctx context.Context, id string) error { return m.ClearRefreshTokenFn(ctx, id) }