mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
31e4b77525
refs https://github.com/TryGhost/Team/issues/1084 refs https://github.com/TryGhost/Team/issues/1085 - adds model/validator/config and router for offers - updates template for offer list and detail with dynamic values - updated route handling for offer list and creation - wires offer data from API to list and detail pages
23 lines
665 B
JavaScript
23 lines
665 B
JavaScript
import Model, {attr} from '@ember-data/model';
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
|
|
|
export default Model.extend(ValidationEngine, {
|
|
validationType: 'offer',
|
|
|
|
name: attr('string'),
|
|
code: attr('string'),
|
|
cadence: attr('string'),
|
|
tier: attr(),
|
|
stripeCouponId: attr('string'),
|
|
interval: attr('string'),
|
|
currency: attr('string'),
|
|
type: attr('string'),
|
|
amount: attr('number'),
|
|
duration: attr('string'),
|
|
durationInMonths: attr('number'),
|
|
displayTitle: attr('string'),
|
|
displayDescription: attr('string'),
|
|
createdAtUTC: attr('moment-utc'),
|
|
updatedAtUTC: attr('moment-utc')
|
|
});
|