mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
5a659c9ebe
refs https://github.com/TryGhost/Team/issues/586 Adds new models for stripe price and product tables
19 lines
496 B
JavaScript
19 lines
496 B
JavaScript
const ghostBookshelf = require('./base');
|
|
|
|
const StripePrice = ghostBookshelf.Model.extend({
|
|
tableName: 'stripe_prices',
|
|
|
|
stripeProduct() {
|
|
return this.belongsTo('StripeProduct', 'stripe_product_id', 'stripe_product_id');
|
|
}
|
|
});
|
|
|
|
const StripePrices = ghostBookshelf.Collection.extend({
|
|
model: StripePrice
|
|
});
|
|
|
|
module.exports = {
|
|
StripePrice: ghostBookshelf.model('StripePrice', StripePrice),
|
|
StripePrices: ghostBookshelf.collection('StripePrices', StripePrices)
|
|
};
|