0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/models
Fabien 'egg' O'Carroll 4fe417bcab
Added Product, StripeProduct & StripePrice relations (#12877)
refs https://github.com/TryGhost/Team/issues/586

We have to use `belongsToMany` because of the way bookshelf relations
work. In reality the relationship is 'hasMany', e.g. a Product has many
Stripe Prices.

These relations are the minimal needed to satisfy the following
relationships without transforming the results. (e.g. flattening the
StripePrices from a list of StripeProducts for a Product)

Product -> StripeProduct:       product.related('stripeProducts')
StripeProduct -> StripePrice:   stripeProduct.related('stripePrices');
Product -> StripePrice:         product.related('stripePrices');
StripePrice -> Product:         stripePrice.related('stripeProduct.product');
2021-04-14 19:20:39 +01:00
..
base 🐛 Fixed performance regression introduced in 4.1.0 (#12807) 2021-03-23 09:11:24 +00:00
plugins Added Product model and Member model relation (#12859) 2021-04-08 18:01:49 +01:00
relations
action.js
api-key.js
author.js
email-batch.js
email-recipient.js
email.js
index.js Added models for stripe prices and products 2021-04-12 21:53:59 +05:30
integration.js
invite.js 🐛 Allowed for inviting contributors when staff is limited 2021-03-15 11:40:44 +00:00
label.js
member-email-change-event.js
member-login-event.js
member-paid-subscription-event.js
member-payment-event.js
member-status-event.js
member-stripe-customer.js
member-subscribe-event.js
member.js Added Product model and Member model relation (#12859) 2021-04-08 18:01:49 +01:00
mobiledoc-revision.js
permission.js
post.js 🐛 Fixed plaintext and excerpt fallbacks having incorrect URLs after domain change (#12811) 2021-03-23 16:56:14 +00:00
posts-meta.js 🐛 Fixed performance regression introduced in 4.1.0 (#12807) 2021-03-23 09:11:24 +00:00
product.js Added Product, StripeProduct & StripePrice relations (#12877) 2021-04-14 19:20:39 +01:00
role.js
session.js
settings.js 🐛 Fixed performance regression introduced in 4.1.0 (#12807) 2021-03-23 09:11:24 +00:00
single-use-token.js
snippet.js 🐛 Fixed performance regression introduced in 4.1.0 (#12807) 2021-03-23 09:11:24 +00:00
stripe-customer-subscription.js
stripe-price.js Added models for stripe prices and products 2021-04-12 21:53:59 +05:30
stripe-product.js Added Product, StripeProduct & StripePrice relations (#12877) 2021-04-14 19:20:39 +01:00
tag-public.js
tag.js 🐛 Fixed performance regression introduced in 4.1.0 (#12807) 2021-03-23 09:11:24 +00:00
user.js 🐛 Fixed limits not allowing contributors to be unsuspended 2021-03-23 14:04:18 +00:00
webhook.js