InstalmentOffer.js 636 B

1234567891011121314151617181920212223242526272829
  1. import { Invoice } from 'src/models/Invoice.js'
  2. import { Model, Collection } from 'js-abstract-model'
  3. class InstalmentOffer extends Model {
  4. constructor (data) {
  5. super(data, [
  6. { key: 'id' },
  7. { key: 'amount' },
  8. { key: 'count' },
  9. { key: 'due_date_interval' },
  10. { key: 'starting_date' },
  11. { key: 'description' },
  12. { key: 'is_accepted' },
  13. { key: 'invoice' },
  14. {
  15. key: 'invoice_info',
  16. relatedModel: Invoice
  17. }
  18. ])
  19. }
  20. }
  21. class InstalmentOfferList extends Collection {
  22. model() {
  23. return InstalmentOffer
  24. }
  25. }
  26. export { InstalmentOffer, InstalmentOfferList }