feat: add gathering invoice line schema - #4720
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (63)
📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughChangesAdds shared invoice-line intent fields, a new Gathering invoice lines
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
512a0d5 to
d743881
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openmeter/ent/schema/billing.go`:
- Around line 307-315: Add an Annotations method to
StandardInvoiceLineIntentMixin that defines a database check constraint
requiring child_unique_reference_id to be non-empty, matching the existing
constraint pattern used by the standard detailed line schema.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4c8d2ec9-edab-4097-95a6-456ac6cec27c
⛔ Files ignored due to path filters (63)
openmeter/ent/db/billinggatheringinvoiceline.gois excluded by!**/ent/db/**openmeter/ent/db/billinggatheringinvoiceline/billinggatheringinvoiceline.gois excluded by!**/ent/db/**openmeter/ent/db/billinggatheringinvoiceline/where.gois excluded by!**/ent/db/**openmeter/ent/db/billinggatheringinvoiceline_create.gois excluded by!**/ent/db/**openmeter/ent/db/billinggatheringinvoiceline_delete.gois excluded by!**/ent/db/**openmeter/ent/db/billinggatheringinvoiceline_query.gois excluded by!**/ent/db/**openmeter/ent/db/billinggatheringinvoiceline_update.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoice.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoice/billinginvoice.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoice/where.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoice_create.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoice_query.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoice_update.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoicesplitlinegroup.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoicesplitlinegroup/billinginvoicesplitlinegroup.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoicesplitlinegroup/where.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoicesplitlinegroup_create.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoicesplitlinegroup_query.gois excluded by!**/ent/db/**openmeter/ent/db/billinginvoicesplitlinegroup_update.gois excluded by!**/ent/db/**openmeter/ent/db/charge.gois excluded by!**/ent/db/**openmeter/ent/db/charge/charge.gois excluded by!**/ent/db/**openmeter/ent/db/charge/where.gois excluded by!**/ent/db/**openmeter/ent/db/charge_create.gois excluded by!**/ent/db/**openmeter/ent/db/charge_query.gois excluded by!**/ent/db/**openmeter/ent/db/charge_update.gois excluded by!**/ent/db/**openmeter/ent/db/client.gois excluded by!**/ent/db/**openmeter/ent/db/cursor.gois excluded by!**/ent/db/**openmeter/ent/db/ent.gois excluded by!**/ent/db/**openmeter/ent/db/entmixinaccessor.gois excluded by!**/ent/db/**openmeter/ent/db/expose.gois excluded by!**/ent/db/**openmeter/ent/db/hook/hook.gois excluded by!**/ent/db/**openmeter/ent/db/migrate/schema.gois excluded by!**/ent/db/**openmeter/ent/db/mutation.gois excluded by!**/ent/db/**openmeter/ent/db/paginate.gois excluded by!**/ent/db/**openmeter/ent/db/predicate/predicate.gois excluded by!**/ent/db/**openmeter/ent/db/runtime.gois excluded by!**/ent/db/**openmeter/ent/db/setorclear.gois excluded by!**/ent/db/**openmeter/ent/db/subscription.gois excluded by!**/ent/db/**openmeter/ent/db/subscription/subscription.gois excluded by!**/ent/db/**openmeter/ent/db/subscription/where.gois excluded by!**/ent/db/**openmeter/ent/db/subscription_create.gois excluded by!**/ent/db/**openmeter/ent/db/subscription_query.gois excluded by!**/ent/db/**openmeter/ent/db/subscription_update.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionitem.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionitem/subscriptionitem.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionitem/where.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionitem_create.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionitem_query.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionitem_update.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionphase.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionphase/subscriptionphase.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionphase/where.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionphase_create.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionphase_query.gois excluded by!**/ent/db/**openmeter/ent/db/subscriptionphase_update.gois excluded by!**/ent/db/**openmeter/ent/db/taxcode.gois excluded by!**/ent/db/**openmeter/ent/db/taxcode/taxcode.gois excluded by!**/ent/db/**openmeter/ent/db/taxcode/where.gois excluded by!**/ent/db/**openmeter/ent/db/taxcode_create.gois excluded by!**/ent/db/**openmeter/ent/db/taxcode_query.gois excluded by!**/ent/db/**openmeter/ent/db/taxcode_update.gois excluded by!**/ent/db/**openmeter/ent/db/tx.gois excluded by!**/ent/db/**tools/migrate/migrations/atlas.sumis excluded by!**/*.sum,!**/*.sum
📒 Files selected for processing (6)
openmeter/ent/schema/billing.goopenmeter/ent/schema/charges.goopenmeter/ent/schema/subscription.goopenmeter/ent/schema/taxcode.gotools/migrate/migrations/20260716050537_create_billing_gathering_invoice_lines.down.sqltools/migrate/migrations/20260716050537_create_billing_gathering_invoice_lines.up.sql
d743881 to
1a36de3
Compare
1a36de3 to
d2fc9da
Compare
Summary
billing_gathering_invoice_linesEnt schema and relationshipsWhy
This establishes the database wiring needed to split gathering lines from the legacy invoice-line table. Application reads, writes, and data migration are intentionally left for follow-up work.
Impact
This PR is schema-only. It does not switch billing behavior or migrate existing gathering lines.
Validation
go test ./openmeter/ent/...make migrate-check-validatemake migrate-check-lintgit diff --checkSummary by CodeRabbit
New Features
Bug Fixes
Greptile Summary
This PR adds database support for gathering-stage invoice lines. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Reviews (4): Last reviewed commit: "fix: reject empty gathering line child r..." | Re-trigger Greptile
Context used (3)