import { OpenAPIHono } from '@hono/zod-openapi';
import { AuthContext } from '@d8d/shared-types';
import { publicGoodsRoutesMt } from './public-goods-routes.mt';
import { publicGoodsChildrenRoutesMt } from './public-goods-children.mt';

// 聚合基础CRUD路由和子商品列表路由
// 保持publicGoodsRoutesMt名称不变，前端代码无需修改
const publicGoodsRoutesAggregated = new OpenAPIHono<AuthContext>()
  .route('/', publicGoodsRoutesMt)
  .route('/', publicGoodsChildrenRoutesMt);

export default publicGoodsRoutesAggregated;
export { publicGoodsRoutesAggregated as publicGoodsRoutesMt };