Guest User

Untitled

a guest
Feb 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. //User.js - my model
  2. module.exports = {
  3.  
  4. attributes: {
  5.  
  6. firstName : { type: 'string' },
  7.  
  8. lastName : { type: 'string' },
  9.  
  10.  
  11. getName: function () {
  12. return this.firstName + ':' + this.lastName;
  13. }
  14. }
  15. };
  16.  
  17. const testData = {
  18. firstName: 'Foo',
  19. lastName: 'Bar'
  20. };
  21.  
  22. Admin.create(testData);
Add Comment
Please, Sign In to add comment