Ghost/ghost/admin/app/models/offer.js
Rishabh 31e4b77525 Added initial wiring for offer screens
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
2021-10-06 20:01:25 +05:30

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')
});