2021-10-06 17:29:15 +03:00
|
|
|
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'),
|
2021-10-13 18:46:43 +03:00
|
|
|
status: attr('string', {defaultValue: 'active'}),
|
2021-10-06 17:29:15 +03:00
|
|
|
tier: attr(),
|
|
|
|
stripeCouponId: attr('string'),
|
2021-10-18 21:16:30 +03:00
|
|
|
redemptionCount: attr('number'),
|
2021-10-06 17:29:15 +03:00
|
|
|
currency: attr('string'),
|
2021-10-07 23:11:30 +03:00
|
|
|
type: attr('string', {defaultValue: 'percent'}),
|
2021-10-06 17:29:15 +03:00
|
|
|
amount: attr('number'),
|
2021-10-18 21:49:32 +03:00
|
|
|
duration: attr('string', {defaultValue: 'once'}),
|
2021-10-06 17:29:15 +03:00
|
|
|
durationInMonths: attr('number'),
|
|
|
|
displayTitle: attr('string'),
|
|
|
|
displayDescription: attr('string'),
|
|
|
|
createdAtUTC: attr('moment-utc'),
|
|
|
|
updatedAtUTC: attr('moment-utc')
|
|
|
|
});
|