import { z } from 'zod';

/**
 * Enum schema for sort directions in ordering operations.
 * Provides type-safe options for ascending or descending sorting.
 *
 * - 'asc': Ascending order (A-Z, 0-9, oldest to newest)
 * - 'desc': Descending order (Z-A, 9-0, newest to oldest)
 */
export const OrderByDirectionSchema = z
  .enum(['asc', 'desc'])
  .describe(
    'Direction for sorting operations, either ascending (asc) or descending (desc).',
  );

export type OrderByDirection = z.infer<typeof OrderByDirectionSchema>;
