``` const enquiry = await db.enquiry.findFirst({ ...
# orm-help
a
Copy code
const enquiry = await db.enquiry.findFirst({
    where: { id },
    include: {
      users: {
        include: {
          user: true,
        },
      },
    },
  })

  if (!enquiry) throw new NotFoundError()

  const partner = enquiry.users.filter((arr) => arr.user.role === "PARTNER")[0]
  const customer = enquiry.users.filter((arr) => arr.user.role === "USER")[0]

return { ...enquiry, partner, customer }
is this good idea? what are the other way to do?