feat: Add account attributes to account model

This commit is contained in:
Susmitha Girumala committed 2020-09-14 11:45:48 -04:00
1 parent 879989a127
commit a3060e089d
6 files changed
+59 -1

No files matched your search

+10 -1
View File
@@ -1,3 +1,12 @@
import GeneratedAccountModel from '../generated/models/account';
import { fragment } from 'ember-data-model-fragments/attributes';
export default class AccountModel extends GeneratedAccountModel {}
export default class AccountModel extends GeneratedAccountModel {
/**
* Attributes of this resource, if any, represented as a JSON fragment.
* @type {FragmentAccountAttributesModel}
*/
@fragment('fragment-account-attributes', { defaultValue: {} }) attributes;
}
@@ -0,0 +1,13 @@
import Fragment from 'ember-data-model-fragments/fragment';
import { attr } from '@ember-data/model';
export default class FragmentAccountAttributesModel extends Fragment {
@attr('string', {
description: 'The account login name'
}) login_name;
@attr('string', {
description: 'The account password'
}) password;
}
@@ -6,4 +6,5 @@ export default class FragmentHostAttributesModel extends Fragment {
@attr('string', {
description: 'The address (DNS or IP name) used to reach the host'
}) address;
}