DolibarrAccount.ts 890 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. import type {
  5. DolibarrBill,
  6. DolibarrContract,
  7. DolibarrOrder,
  8. } from '~/types/interfaces'
  9. /**
  10. * The Dolibarr account of an organization
  11. *
  12. * @see https://gitlab.2iopenservice.com/opentalent/ap2i/-/blob/develop/src/ApiResources/Dolibarr/DolibarrAccount.php
  13. */
  14. export default class DolibarrAccount extends ApiResource {
  15. static override entity = 'dolibarr/account'
  16. @Uid()
  17. declare id: number | string | null
  18. @IdField()
  19. @Num(0, { notNullable: true })
  20. declare organizationId: number
  21. @Str(null)
  22. declare clientNumber: string
  23. @Str(null)
  24. declare product: string
  25. @Attr({})
  26. declare contract: DolibarrContract
  27. @Attr(null)
  28. declare order: DolibarrOrder
  29. @Attr([])
  30. declare bills: Array<DolibarrBill>
  31. }