mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
11d244194f
Beforehand, the name of the branch is not representative of the work that has been done in this PR **TLDR:** Solves https://github.com/twentyhq/private-issues/issues/192 Add 3 tables BillingCustomer, BillingProduct and BillingPrice and BillingMeter to core, inspired by the Stripe implementation. Separates migration, between common and billing on order to not populate the db of the self-hosting instances with unused tables. **In order to test:** Run the command: npx nx typeorm -- migration:run -d src/database/typeorm/core/core.datasource.ts **Considerations:** I only put the information we should use right now in the Billing module, for instance columns like meter or agreggation formula where omitted in the creation of the tables. These columns and other ones who fall on the same spectrum will be added as we need them. If you want to add more information to the table, I'll leave some utility links down bellow: - BillingPrices: https://docs.stripe.com/api/prices/object - BillingCustomer: https://docs.stripe.com/api/customers/object - BillingProduct: https://docs.stripe.com/api/products/object **Next Steps** Use the Stripe Webhook in order to update the tables accordingly --------- Co-authored-by: Félix Malfait <felix@twenty.com> |
||
---|---|---|
.. | ||
@types | ||
patches | ||
scripts | ||
src | ||
test/integration | ||
.env.example | ||
.env.test | ||
.eslintrc.cjs | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
.swcrc | ||
jest-integration.config.ts | ||
jest.config.ts | ||
nest-cli.json | ||
package.json | ||
project.json | ||
tsconfig.build.json | ||
tsconfig.json | ||
tsconfig.scripts.json |