возражение с нетерпением ждем загрузки
await this.model.query().withGraphJoined('assignment.[car_order.[company, project]]')
/** output
[{
cars: {
id: 1,
vehicle_name: toyota,
assignment: [
Assignment: {
id: 3598,
created_at: 2021-09-13T09:14:59.000Z,
updated_at: 2021-09-13T09:14:59.000Z,
created_by: null,
updated_by: null,
car_order: CarOrder {
id: 3691,
created_at: 2021-09-13T09:14:39.000Z,
updated_at: 2021-09-13T09:14:39.000Z,
created_by: 14,
updated_by: 14,
round_trip: 0,
additional_passenger: null,
package_type: 'any',
driver_status: 'any',
car_type: 'any',
cost_center: 'C124657',
company: Company {
id: 11,
microservice_updated_at: 2021-01-09T23:45:12.000Z,
created_at: 2020-10-06T09:00:04.000Z,
updated_at: 2022-02-05T03:05:02.000Z
},
project: Project {
id: 13,,
company_id: 'C20197097',
created_at: 2020-10-06T09:02:03.000Z,
updated_at: 2019-12-02T05:03:46.000Z
}
}
}]
}
}]
*/
Restu Wahyu Saputra