mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
ba4c53134f
no issue - update imports for `@ember-data` package (https://github.com/emberjs/rfcs/blob/master/text/0395-ember-data-packages.md) - use `computed.reads` where applicable (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/require-computed-macros.md) - fix usage of `scheduleOnce` so that functions are only scheduled once (https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-incorrect-calls-with-inline-anonymous-functions.md)
29 lines
747 B
JavaScript
29 lines
747 B
JavaScript
import Model, {attr, belongsTo} from '@ember-data/model';
|
|
import {equal} from '@ember/object/computed';
|
|
|
|
export default Model.extend({
|
|
emailCount: attr('number'),
|
|
error: attr('string'),
|
|
html: attr('string'),
|
|
plaintext: attr('string'),
|
|
stats: attr('json-string'),
|
|
status: attr('string'),
|
|
subject: attr('string'),
|
|
submittedAtUTC: attr('moment-utc'),
|
|
uuid: attr('string'),
|
|
|
|
createdAtUTC: attr('moment-utc'),
|
|
createdBy: attr('string'),
|
|
updatedAtUTC: attr('moment-utc'),
|
|
updatedBy: attr('string'),
|
|
|
|
post: belongsTo('post'),
|
|
|
|
isSuccess: equal('status', 'submitted'),
|
|
isFailure: equal('status', 'failed'),
|
|
|
|
retry() {
|
|
return this.store.adapterFor('email').retry(this);
|
|
}
|
|
});
|