-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tax): introduce tax override data models #6422
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
|
b77f91b
to
3e41e6b
Compare
If we make them specific for product, shipping, product_type, wouldn't it make sense to have them as link definitions? If we are to keep them in the module, we could just create a single generic table, where you specify a |
I wanted to include them into the tax module because this gives the tax module the feature of having tax overrides. If the rules only exist as relations we make it a task for the consumer to find the right tax rates (as opposed to exposing a
Yeah this might actually be better - is it possible to have links like this? |
…to feat/tax-module-rules
Other modules are copying the TaxRate internally at the moment. I am not sure I get which link you mean. |
The one I was thinking about was one that could be used in remoteQuery to allow a query like this:
I.e., if it were possible for remote query to understand a link like "reference_type + reference_id". But this was more out of curiosity, not something that is required at all. |
[PrimaryKeyProp]?: ["tax_rate_id", "reference_id"] | ||
|
||
@Property({ columnType: "text" }) | ||
reference_type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on how filters will be passed to fetch data from this table, probably individual indexes on tax_rate_id, reference_id and reference_type will be a better choice than this composite primary key.
Keeping the composite key and adding additional indexes is also an option.
This isn't implemented at the moment, but it's definitely doable |
What
Punted to future PR