Ghost/ghost/admin/app/models/offer.js
Rishabh 667a4b6e78 Added (un)archive button to offer detail screen
refs https://github.com/TryGhost/Team/issues/1136

- adds option to archive/unarchive an offer
- adds new modals for confirmation of archive or unarchive of offer
- wired (un)archiving of offers to API
2021-10-13 21:23:30 +05:30

23 lines
743 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'),
status: attr('string', {defaultValue: 'active'}),
tier: attr(),
stripeCouponId: attr('string'),
currency: attr('string'),
type: attr('string', {defaultValue: 'percent'}),
amount: attr('number'),
duration: attr('string', {defaultValue: 'forever'}),
durationInMonths: attr('number'),
displayTitle: attr('string'),
displayDescription: attr('string'),
createdAtUTC: attr('moment-utc'),
updatedAtUTC: attr('moment-utc')
});