feat: Add account attributes to account model
This commit is contained in:
6 files changed
+59
-1
No files matched your search
@@ -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;
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user