DolibarrAccount.ts 843 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { Attr, Str, Uid, Num } from 'pinia-orm/dist/decorators'
  2. import ApiResource from '~/models/ApiResource'
  3. import { IdField } from '~/models/decorators'
  4. /**
  5. * The Dolibarr account of an organization
  6. *
  7. * @see https://gitlab.2iopenservice.com/opentalent/ap2i/-/blob/develop/src/ApiResources/Dolibarr/DolibarrAccount.php
  8. */
  9. export default class DolibarrAccount extends ApiResource {
  10. static entity = 'dolibarr/account'
  11. @Uid()
  12. declare id: number | string | null
  13. @IdField()
  14. @Num(0, { notNullable: true })
  15. declare organizationId: number
  16. @Str(null)
  17. declare clientNumber: string
  18. @Str(null)
  19. declare product: string
  20. @Attr({})
  21. declare contract: object
  22. @Attr(null)
  23. declare order: object
  24. @Attr([])
  25. declare bills: Array<{
  26. ref: string
  27. date: string
  28. taxExcludedAmount: number
  29. paid: boolean
  30. }>
  31. }