2018-10-04 04:32:55 +00:00
|
|
|
import DS from 'ember-data';
|
2018-10-06 03:02:23 +00:00
|
|
|
import { match } from '@ember/object/computed';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-10-04 04:32:55 +00:00
|
|
|
const { attr, hasMany, belongsTo, Model } = DS;
|
|
|
|
|
|
|
|
export default Model.extend({
|
|
|
|
engine: belongsTo('secret-engine'),
|
2018-10-06 03:02:23 +00:00
|
|
|
versions: hasMany('secret-v2-version', { async: false, inverse: null }),
|
2018-10-10 04:44:08 +00:00
|
|
|
selectedVersion: belongsTo('secret-v2-version', { async: false, inverse: 'secret' }),
|
2018-10-04 04:32:55 +00:00
|
|
|
createdTime: attr(),
|
|
|
|
updatedTime: attr(),
|
|
|
|
currentVersion: attr('number'),
|
|
|
|
oldestVersion: attr('number'),
|
|
|
|
maxVersions: attr('number'),
|
|
|
|
casRequired: attr('boolean'),
|
2018-10-06 03:02:23 +00:00
|
|
|
isFolder: match('id', /\/$/),
|
2018-10-04 04:32:55 +00:00
|
|
|
});
|