Skip to content

CONV-228: Create ConversionCreditCharge model and migration#197

Merged
menvil merged 1 commit into
developfrom
feature/CONV-228-create-conversion-credit-charge-model-and-migration
Jun 2, 2026
Merged

CONV-228: Create ConversionCreditCharge model and migration#197
menvil merged 1 commit into
developfrom
feature/CONV-228-create-conversion-credit-charge-model-and-migration

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds conversion_credit_charges table migration with user_id, conversion_job_id, estimated/captured/refunded amounts, status, and breakdown_json
  • Adds ConversionCreditCharge model with user/conversionJob relationships
  • Adds ConversionCreditChargeStatus enum (estimated, captured, refunded, failed)
  • Adds ConversionCreditChargeFactory with state helpers

Test plan

  • ConversionCreditChargeTest passes (4 tests)

🤖 Generated with Claude Code


Summary by cubic

Implements credit charge tracking for conversions (CONV-228) by adding a new table and model. Supports estimating, capturing, and refunding user credits per conversion job.

  • New Features
    • New conversion_credit_charges table with user_id, conversion_job_id (nullable), estimated/captured/refunded amounts, status, breakdown_json; indexes on (user_id, status) and conversion_job_id.
    • ConversionCreditCharge model with enum cast for status and array cast for breakdown_json; relations to User and ConversionJob.
    • ConversionCreditChargeStatus enum: estimated, captured, refunded, failed.
    • ConversionCreditChargeFactory with estimated, captured, and failed state helpers.

Written for commit 2cc88b9. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit b787f32 into develop Jun 2, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5f005943-f2bf-4614-a861-0c494bb8067c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-228-create-conversion-credit-charge-model-and-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@menvil menvil deleted the feature/CONV-228-create-conversion-credit-charge-model-and-migration branch June 2, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant