mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
dc6b2884f1
refs https://github.com/TryGhost/Team/issues/792 - updates product model to read product's list of benefits - adds transformer to return emberArray with list of product benefits - adds new model for each product benefit - adds validator for new product benefit
14 lines
404 B
JavaScript
14 lines
404 B
JavaScript
import Model, {attr} from '@ember-data/model';
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
|
|
|
export default Model.extend(ValidationEngine, {
|
|
validationType: 'product',
|
|
|
|
name: attr('string'),
|
|
description: attr('string'),
|
|
slug: attr('string'),
|
|
monthlyPrice: attr('stripe-price'),
|
|
yearlyPrice: attr('stripe-price'),
|
|
benefits: attr('product-benefits')
|
|
});
|