import { OpenAPIHono } from '@hono/zod-openapi';
import { AuthContext } from '@d8d/shared-types';
import orderCustomRoutes, { enterpriseOrderCustomRoutes } from './order-custom.routes';
import { orderCrudRoutes } from './order-crud.routes';

/**
 * 通用订单管理路由
 * 包含通用CRUD路由和通用自定义路由
 */
const orderRoutes = new OpenAPIHono<AuthContext>()
  .route('/', orderCrudRoutes)
  .route('/', orderCustomRoutes);

/**
 * 企业专用订单路由
 * 仅包含企业专用自定义路由
 */
const enterpriseOrderRoutes = new OpenAPIHono<AuthContext>()
  .route('/', enterpriseOrderCustomRoutes);

export { orderRoutes, enterpriseOrderRoutes };
export default orderRoutes;