DolibarrAccount.ts 803 B

123456789101112131415161718192021222324252627282930313233343536
  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([])
  23. declare bills: Array<{
  24. ref: string
  25. date: string
  26. taxExcludedAmount: number
  27. paid: boolean
  28. }>
  29. }