Ghost/ghost/admin/app/models/product.js
Rishabh 12c840787c Added default visibility to new tiers
refs https://github.com/TryGhost/Team/issues/1387

- adds default visibility as `none` for new tiers
2022-03-08 14:20:24 +05:30

18 lines
575 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'),
active: attr('boolean'),
slug: attr('string'),
welcomePageURL: attr('string'),
visibility: attr('string', {defaultValue: 'none'}),
type: attr('string', {defaultValue: 'paid'}),
monthlyPrice: attr('stripe-price'),
yearlyPrice: attr('stripe-price'),
benefits: attr('product-benefits')
});