Builds Prisma-compatible sort parameters from field name and order.
This utility function creates the orderBy object structure required by Prisma
ORM for sorting database queries. It provides a fallback to 'createdAt' field
when no sort field is specified and handles the conversion to Prisma's expected
object format.
Builds Prisma-compatible sort parameters from field name and order.
This utility function creates the orderBy object structure required by Prisma ORM for sorting database queries. It provides a fallback to 'createdAt' field when no sort field is specified and handles the conversion to Prisma's expected object format.