/**
 * Express Request 接口扩展
 * 添加用户相关属性和追踪上下文
 */

declare global {
  namespace Express {
    interface User {
      id: string;
      tenantId: string;
      role: string;
      email: string;
      [key: string]: any;
    }

    interface Request {
      user?: User;
      traceContext?: {
        tenantId: string;
        shopId: string;
        traceId: string;
        businessType: 'TOC' | 'TOB';
      };
    }
  }
}

export {};
