import ApiResource from "~/models/ApiResource";
import {Attr, Num, Str, Uid} from "pinia-orm/dist/decorators";

/**
 * The Dolibarr account of an organization
 *
 * @see https://gitlab.2iopenservice.com/opentalent/ap2i/-/blob/develop/src/ApiResources/Dolibarr/DolibarrAccount.php
 */
export default class DolibarrAccount extends ApiResource {
    static entity = 'dolibarr/account'

    @Uid()
    declare id: number | string | null

    @Num(0, { notNullable: true })
    declare organizationId: number

    @Str(null)
    declare clientNumber: string

    @Str(null)
    declare product: string

    @Attr({})
    declare contract: object

    @Attr([])
    declare bills: Array<object>
}
