import { OpenAPIHono } from '@hono/zod-openapi';
import { AuthContext } from '@d8d/shared-types';
import { adminGoodsRoutesMt } from './admin-goods-routes.mt';
import { adminGoodsParentChildRoutesMt } from './admin-goods-parent-child.mt';

// 聚合基础CRUD路由和父子商品管理路由
// 保持adminGoodsRoutesMt名称不变，前端代码无需修改
const adminGoodsRoutesAggregated = new OpenAPIHono<AuthContext>()
  .route('/', adminGoodsRoutesMt)
  .route('/', adminGoodsParentChildRoutesMt);

export default adminGoodsRoutesAggregated;
export { adminGoodsRoutesAggregated as adminGoodsRoutesMt };