fix(test): add missing stub methods to stubRedeemCodeRepo in api_contract_test

Add ListByUserPaginated and SumPositiveBalanceByUser methods
This commit is contained in:
bayma888
2026-02-03 19:36:17 +08:00
parent d008941cb3
commit 730d2a9ad2

View File

@@ -1141,6 +1141,14 @@ func (r *stubRedeemCodeRepo) ListByUser(ctx context.Context, userID int64, limit
return append([]service.RedeemCode(nil), codes...), nil return append([]service.RedeemCode(nil), codes...), nil
} }
func (stubRedeemCodeRepo) ListByUserPaginated(ctx context.Context, userID int64, params pagination.PaginationParams, codeType string) ([]service.RedeemCode, *pagination.PaginationResult, error) {
return nil, nil, errors.New("not implemented")
}
func (stubRedeemCodeRepo) SumPositiveBalanceByUser(ctx context.Context, userID int64) (float64, error) {
return 0, errors.New("not implemented")
}
type stubUserSubscriptionRepo struct { type stubUserSubscriptionRepo struct {
byUser map[int64][]service.UserSubscription byUser map[int64][]service.UserSubscription
activeByUser map[int64][]service.UserSubscription activeByUser map[int64][]service.UserSubscription