mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 22:01:49 +03:00
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)
|
||
|
};
|