Wallet.js 570 B

1234567891011121314151617181920212223242526272829
  1. import { Model, Collection } from 'js-abstract-model'
  2. class Wallet extends Model {
  3. constructor (data) {
  4. super(data, [
  5. { key: 'id' },
  6. { key: 'is_active' },
  7. { key: 'is_deleted' },
  8. {
  9. key: 'inventory',
  10. default: 0
  11. },
  12. { key: 'description' },
  13. { key: 'additional_data' },
  14. { key: 'creation_time' },
  15. { key: 'last_modification_time' },
  16. { key: 'creator' },
  17. { key: 'owner' }
  18. ])
  19. }
  20. }
  21. class WalletList extends Collection {
  22. model() {
  23. return Wallet
  24. }
  25. }
  26. export { Wallet, WalletList }