open-vault/ui/app/models/secret-v2.js
2018-10-18 14:55:48 -05:00

18 lines
570 B
JavaScript

import DS from 'ember-data';
import { match } from '@ember/object/computed';
const { attr, hasMany, belongsTo, Model } = DS;
export default Model.extend({
engine: belongsTo('secret-engine'),
versions: hasMany('secret-v2-version', { async: false, inverse: null }),
selectedVersion: belongsTo('secret-v2-version', { async: false, inverse: 'secret' }),
createdTime: attr(),
updatedTime: attr(),
currentVersion: attr('number'),
oldestVersion: attr('number'),
maxVersions: attr('number'),
casRequired: attr('boolean'),
isFolder: match('id', /\/$/),
});