export default {
    fields: [
        'id',
        'clientFk',
        'created',
        'workerFk',
        'claimStateFk',
        'packages',
        'pickup',
        'ticketFk',
    ],
    include: [
        {
            relation: 'client',
            scope: {
                include: [
                    { relation: 'salesPersonUser' },
                    {
                        relation: 'claimsRatio',
                        scope: {
                            fields: ['claimingRate'],
                            limit: 1,
                        },
                    },
                ],
            },
        },
        {
            relation: 'claimState',
        },
        {
            relation: 'ticket',
            scope: {
                include: [
                    { relation: 'zone' },
                    {
                        relation: 'address',
                        scope: {
                            include: { relation: 'province' },
                        },
                    },
                ],
            },
        },
        {
            relation: 'worker',
            scope: {
                include: { relation: 'user' },
            },
        },
    ],
};
