{
  "openapi": "3.0.0",
  "info": {
    "title": "小袋鼠绿通服务 · 陪诊后台 API",
    "description": "陪诊后台管理端接口文档（与 `陪诊后台/src/api/*.ts` 一一对应）。\n\n当前工程处于 Mock 模式（`src/api/request.ts` 中 `USE_MOCK = true`），所有接口数据由前端 `src/mock/` 层返回；切换为 `false` 后走真实后端接口。\n\n## 统一返回格式\n\n所有接口返回统一结构：\n\n```json\n{ \"code\": 200, \"message\": \"ok\", \"data\": { ... } }\n```\n\n- `code`：200 表示成功，非 200 为业务失败（由 request 层 ElMessage 提示并 reject）。\n- `message`：提示信息。\n- `data`：业务数据，即本文档中各接口的 `data` 结构。\n\n## 通用约定\n\n- 列表接口统一返回 `{ list: [...], total: number }`，分页由前端携带 `page` / `pageSize` 参数。\n- 业务订单状态 `status`：`unpaid`（待支付）/ `pending`（待分配）/ `assigned`（已分配）/ `serving`（服务中）/ `done`（已完成）/ `cancel`（已取消）/ `refunding`（退款中）/ `refunded`（已退款）\n- 支付订单状态 `status`：`成功` / `失败` / `处理中`\n- 认证状态 `certStatus`：`待审核` / `已通过` / `已拒绝`\n- 新增/编辑接口：`data` 中传 `id`（为空字符串或 null 表示新增，否则为编辑）；返回 `{ success: true }`",
    "version": "1.0.0",
    "contact": {
      "name": "小袋鼠绿通服务"
    }
  },
  "servers": [
    {
      "url": "https://peiz.fjzgn.com.cn/api",
      "description": "生产环境接口地址（Mock 模式下实际数据由前端 mock 层返回）"
    }
  ],
  "tags": [
    { "name": "工作台", "description": "工作台经营数据" },
    { "name": "订单管理", "description": "业务订单、支付订单、券包订单、追加服务订单" },
    { "name": "陪诊师管理", "description": "陪诊师列表、认证审核、培训咨询" },
    { "name": "用户端管理", "description": "C 端用户列表" },
    { "name": "商品管理", "description": "服务商品、赠品、子商品、自营覆盖城市" },
    { "name": "运营管理", "description": "优惠券模板、券码、券包商品、使用记录" },
    { "name": "内容管理", "description": "轮播图、文章" },
    { "name": "系统设置", "description": "管理员账号、操作日志" }
  ],
  "paths": {
    "/admin/dashboard/stats": {
      "get": {
        "tags": ["工作台"],
        "summary": "获取工作台经营数据",
        "description": "返回今日订单总数、进行中订单、今日/总成交额、用户数、陪诊师数、两端日活、近 7 日订单趋势与待办事项。",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": { "$ref": "#/components/schemas/DashboardStats" }
                  }
                }
              }
            }
          }
        }
      }
    },

    "/admin/orders/biz": {
      "get": {
        "tags": ["订单管理"],
        "summary": "业务订单列表",
        "description": "按状态与关键字（订单号/用户/陪诊师/医院）查询业务订单。",
        "parameters": [
          { "name": "status", "in": "query", "required": false, "schema": { "type": "string" }, "description": "订单状态筛选，`all` 表示全部" },
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" }, "description": "关键字：订单号/用户昵称/用户手机号/陪诊师名称/医院" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListResponse" } } } } }
      }
    },
    "/admin/orders/biz/{id}": {
      "get": {
        "tags": ["订单管理"],
        "summary": "业务订单详情",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "订单编号，如 PZ20260807001" }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": { "$ref": "#/components/schemas/BizOrderItem" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/orders/assign": {
      "post": {
        "tags": ["订单管理"],
        "summary": "分配陪诊师",
        "description": "为待分配订单指定陪诊师，分配后订单状态变为 `assigned`。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orderId": { "type": "string", "example": "PZ20260805023" },
                  "companionId": { "type": "string", "example": "ES001" }
                },
                "required": ["orderId", "companionId"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/orders/cancel": {
      "post": {
        "tags": ["订单管理"],
        "summary": "取消订单",
        "description": "取消业务订单，订单状态变为 `refunding`（进入退款流程）。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "PZ20260804034" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/orders/refund-confirm": {
      "post": {
        "tags": ["订单管理"],
        "summary": "确认线下退款完成",
        "description": "确认订单线下退款完成，订单状态变为 `refunded`。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "PZ20260812009" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/orders/pay": {
      "get": {
        "tags": ["订单管理"],
        "summary": "支付订单列表",
        "description": "按状态与关键字（支付单号/业务订单号）查询支付订单。",
        "parameters": [
          { "name": "status", "in": "query", "required": false, "schema": { "type": "string" }, "description": "`all` 表示全部" },
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/PayOrderItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/orders/coupon-pack": {
      "get": {
        "tags": ["订单管理"],
        "summary": "券包商品订单列表",
        "description": "按关键字（订单号/券包名/用户）查询优惠券商品订单。",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/CouponPackOrderItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/orders/addon": {
      "get": {
        "tags": ["订单管理"],
        "summary": "追加服务订单列表",
        "description": "按关键字（追加单号/父订单号/服务名/用户）查询追加服务订单。",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/AddonOrderItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },

    "/admin/companions": {
      "get": {
        "tags": ["陪诊师管理"],
        "summary": "陪诊师列表",
        "description": "按关键字（微信昵称/陪诊师名称/手机号/身份证号）、帐号状态与认证状态查询陪诊师。",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "account", "in": "query", "required": false, "schema": { "type": "string" }, "description": "帐号状态：正常/封禁，`all` 表示全部" },
          { "name": "cert", "in": "query", "required": false, "schema": { "type": "string" }, "description": "认证状态：已认证/未认证，`all` 表示全部" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/CompanionItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/companions/toggle-ban": {
      "post": {
        "tags": ["陪诊师管理"],
        "summary": "封禁/解封陪诊师",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "ES004" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/companions/audit": {
      "get": {
        "tags": ["陪诊师管理"],
        "summary": "认证审核列表",
        "description": "按关键字与认证状态（待审核/已通过/已拒绝）查询认证申请。",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "cert", "in": "query", "required": false, "schema": { "type": "string" }, "description": "`all` 表示全部" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/CompanionItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/companions/audit/pass": {
      "post": {
        "tags": ["陪诊师管理"],
        "summary": "通过认证审核",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "ES006" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/companions/audit/reject": {
      "post": {
        "tags": ["陪诊师管理"],
        "summary": "拒绝认证审核",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "example": "ES008" },
                  "reason": { "type": "string", "example": "资质证书不清晰" }
                },
                "required": ["id", "reason"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/companions/consults": {
      "get": {
        "tags": ["陪诊师管理"],
        "summary": "培训咨询列表",
        "description": "按关键字与处理状态（待处理/已处理）查询培训咨询记录。",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "cat", "in": "query", "required": false, "schema": { "type": "string" }, "description": "处理状态：待处理/已处理，`all` 表示全部" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/ConsultItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/companions/consults/processed": {
      "post": {
        "tags": ["陪诊师管理"],
        "summary": "标记咨询为已处理",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "CQ001" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },

    "/admin/users": {
      "get": {
        "tags": ["用户端管理"],
        "summary": "用户列表",
        "description": "按关键字（昵称/手机号）与状态（正常/冻结）查询 C 端用户。",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "status", "in": "query", "required": false, "schema": { "type": "string" }, "description": "`all` 表示全部" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/UserItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },

    "/admin/goods/services": {
      "get": {
        "tags": ["商品管理"],
        "summary": "服务商品列表",
        "description": "按状态（上架/下架）与关键字（名称/简介）查询服务商品，按权重升序排列。",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "online", "in": "query", "required": false, "schema": { "type": "string" }, "description": "上架/下架，`all` 表示全部" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["商品管理"],
        "summary": "新增/编辑服务商品",
        "description": "`id` 为空或 null 时新增，否则编辑。新增时后端补充 id、sold、icon、color、tags、giftIds、addonIds、carousel、online 默认值。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": ["integer", "null"], "description": "空表示新增" },
                  "name": { "type": "string", "example": "2小时基础陪诊" },
                  "brief": { "type": "string" },
                  "price": { "type": "number", "example": 198 },
                  "linePrice": { "type": "number", "example": 228 },
                  "duration": { "type": "string", "example": "2小时" },
                  "fakeBase": { "type": "integer", "example": 8000 },
                  "weight": { "type": "integer", "example": 1 },
                  "thirdParty": { "type": "string", "description": "第三方商品 ID" },
                  "thumbFile": { "type": "string", "description": "缩略图文件名" },
                  "tags": { "type": "array", "items": { "type": "string" } },
                  "carousel": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "icon": { "type": "string" },
                        "color": { "type": "string" },
                        "url": { "type": "string" },
                        "file": { "type": "string" }
                      }
                    }
                  },
                  "desc": { "type": "string" },
                  "guarantee": { "type": "string" },
                  "notice": { "type": "string" },
                  "giftIds": { "type": "array", "items": { "type": "string" } },
                  "addonIds": { "type": "array", "items": { "type": "string" } }
                },
                "required": ["name", "price"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      },
      "delete": {
        "tags": ["商品管理"],
        "summary": "删除服务商品",
        "description": "已关联订单的服务商品不可删除，返回业务错误「该商品已关联订单，不可删除」。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "integer", "example": 8 } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/goods/services/toggle": {
      "post": {
        "tags": ["商品管理"],
        "summary": "上架/下架服务商品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "integer", "example": 2 } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/goods/services/price": {
      "post": {
        "tags": ["商品管理"],
        "summary": "保存服务商品三档城市等级价格",
        "description": "按一线 / 二线 / 三线城市等级分别配置售价与划线价；保存后 `price` 同步为一线售价。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "integer", "example": 0 },
                  "cityPrices": {
                    "type": "object",
                    "description": "三档城市等级价格（tier1/tier2/tier3）",
                    "properties": {
                      "tier1": { "$ref": "#/components/schemas/CityPrice" },
                      "tier2": { "$ref": "#/components/schemas/CityPrice" },
                      "tier3": { "$ref": "#/components/schemas/CityPrice" }
                    }
                  }
                },
                "required": ["id", "cityPrices"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/goods/gifts": {
      "get": {
        "tags": ["商品管理"],
        "summary": "赠品列表",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/GiftItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["商品管理"],
        "summary": "新增/编辑赠品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": ["string", "null"], "description": "空表示新增" },
                  "name": { "type": "string", "example": "平安保险50万意外保障" },
                  "qty": { "type": "integer", "example": 1 }
                },
                "required": ["name", "qty"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      },
      "delete": {
        "tags": ["商品管理"],
        "summary": "删除赠品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "G01" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/goods/addons": {
      "get": {
        "tags": ["商品管理"],
        "summary": "子商品列表",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/AddonItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["商品管理"],
        "summary": "新增/编辑子商品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": ["string", "null"], "description": "空表示新增" },
                  "name": { "type": "string", "example": "延长服务 1小时" },
                  "price": { "type": "number", "example": 68 },
                  "duration": { "type": "string", "example": "1小时" }
                },
                "required": ["name", "price"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      },
      "delete": {
        "tags": ["商品管理"],
        "summary": "删除子商品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "A01" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/goods/self-cities": {
      "get": {
        "tags": ["商品管理"],
        "summary": "自营覆盖城市列表",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/SelfCityItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["商品管理"],
        "summary": "批量新增自营覆盖城市",
        "description": "传入城市名称数组（格式「省 市」，直辖市为城市名），已存在的城市自动跳过，返回实际新增数量 `added`。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cities": { "type": "array", "items": { "type": "string" }, "example": ["福建省 泉州市", "山东省 青岛市"] }
                },
                "required": ["cities"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": { "type": "boolean", "example": true },
                        "added": { "type": "integer", "example": 2 }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": ["商品管理"],
        "summary": "删除自营覆盖城市",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "C3" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },

    "/admin/ops/coupons": {
      "get": {
        "tags": ["运营管理"],
        "summary": "优惠券模板列表",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/CouponItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["运营管理"],
        "summary": "新增/编辑优惠券模板",
        "description": "新增时后端根据 amount/threshold 自动判定类型（满减/立减）并初始化发放数据。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": ["string", "null"], "description": "空表示新增" },
                  "name": { "type": "string", "example": "满100减20元" },
                  "amount": { "type": "number", "example": 20 },
                  "threshold": { "type": "number", "example": 100 },
                  "validType": { "type": "string", "example": "固定时段" },
                  "validEnd": { "type": "string", "example": "2026-12-31" }
                },
                "required": ["name", "amount"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      },
      "delete": {
        "tags": ["运营管理"],
        "summary": "删除优惠券模板",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "C007" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/ops/coupons/toggle": {
      "post": {
        "tags": ["运营管理"],
        "summary": "启用/停用优惠券模板",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "C006" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/ops/coupons/{couponId}/codes": {
      "get": {
        "tags": ["运营管理"],
        "summary": "优惠券券码列表",
        "description": "按券码生成时间与状态查询指定优惠券的券码。返回 `all`（该券码总数）供进度展示。",
        "parameters": [
          { "name": "couponId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "优惠券 ID，如 C001" },
          { "name": "genTime", "in": "query", "required": false, "schema": { "type": "string" }, "description": "生成日期（yyyy-MM-dd）" },
          { "name": "status", "in": "query", "required": false, "schema": { "type": "string" }, "description": "未兑换/已兑换/已使用/已作废，`all` 表示全部" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/CouponCodeItem" } },
                        "total": { "type": "integer" },
                        "all": { "type": "integer", "description": "该券码总数" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/ops/coupon-codes/generate": {
      "post": {
        "tags": ["运营管理"],
        "summary": "批量生成券码",
        "description": "为指定优惠券生成 `count` 个券码（上限 500），同时累加模板总数。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "couponId": { "type": "string", "example": "C001" },
                  "count": { "type": "integer", "example": 50 }
                },
                "required": ["couponId", "count"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": { "type": "boolean", "example": true },
                        "count": { "type": "integer", "example": 50 }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/ops/coupon-codes/void": {
      "post": {
        "tags": ["运营管理"],
        "summary": "作废单个券码",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "codeId": { "type": "string", "example": "C001-1" } },
                "required": ["codeId"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/ops/coupon-codes/void-batch": {
      "post": {
        "tags": ["运营管理"],
        "summary": "批量作废券码",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "codeIds": { "type": "array", "items": { "type": "string" }, "example": ["C001-1", "C001-2"] }
                },
                "required": ["codeIds"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "success": { "type": "boolean", "example": true },
                        "count": { "type": "integer", "example": 2 }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/ops/coupon-packs": {
      "get": {
        "tags": ["运营管理"],
        "summary": "券包商品列表",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/CouponPackItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["运营管理"],
        "summary": "新增/编辑券包商品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": ["string", "null"], "description": "空表示新增" },
                  "name": { "type": "string", "example": "新人专享券包" },
                  "subtitle": { "type": "string" },
                  "price": { "type": "number", "example": 9.9 },
                  "notice": { "type": "string" }
                },
                "required": ["name", "price"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      },
      "delete": {
        "tags": ["运营管理"],
        "summary": "删除券包商品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "PK03" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/ops/coupon-packs/toggle": {
      "post": {
        "tags": ["运营管理"],
        "summary": "上架/下架券包商品",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "PK01" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/ops/coupon-packs/binds": {
      "post": {
        "tags": ["运营管理"],
        "summary": "保存券包关联优惠券",
        "description": "覆盖式保存券包内关联的优惠券及其数量。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": "string", "example": "PK01" },
                  "coupons": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "coupon": { "type": "string", "example": "满100减20元" },
                        "qty": { "type": "integer", "example": 1 }
                      }
                    }
                  }
                },
                "required": ["id", "coupons"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/ops/coupon-usage": {
      "get": {
        "tags": ["运营管理"],
        "summary": "优惠券使用记录列表",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/CouponUsageItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },

    "/admin/content/banners": {
      "get": {
        "tags": ["内容管理"],
        "summary": "轮播图列表",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/BannerItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["内容管理"],
        "summary": "新增/编辑轮播图",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": ["string", "null"], "description": "空表示新增" },
                  "img": { "type": "string", "example": "banner_01.png" },
                  "url": { "type": "string", "example": "/pages/membership" },
                  "weight": { "type": "integer", "example": 1 },
                  "pos": { "type": "string", "example": "用户端-首页" }
                },
                "required": ["img", "url"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      },
      "delete": {
        "tags": ["内容管理"],
        "summary": "删除轮播图",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "B03" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/content/banners/toggle": {
      "post": {
        "tags": ["内容管理"],
        "summary": "生效/失效轮播图",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "B01" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/content/articles": {
      "get": {
        "tags": ["内容管理"],
        "summary": "文章列表",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/ArticleItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": ["内容管理"],
        "summary": "新增/编辑文章",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": { "type": ["string", "null"], "description": "空表示新增" },
                  "title": { "type": "string", "example": "小袋鼠绿通用户协议" },
                  "pos": { "type": "string", "example": "用户端-用户协议" },
                  "content": { "type": "string" }
                },
                "required": ["title", "pos", "content"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      },
      "delete": {
        "tags": ["内容管理"],
        "summary": "删除文章",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "A5" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/content/articles/toggle": {
      "post": {
        "tags": ["内容管理"],
        "summary": "上线/下线文章",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "A5" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },

    "/admin/system/admins": {
      "get": {
        "tags": ["系统设置"],
        "summary": "管理员账号列表",
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/AdminItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/system/admins/toggle": {
      "post": {
        "tags": ["系统设置"],
        "summary": "启用/停用管理员",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "A03" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/system/admins/reset-pwd": {
      "post": {
        "tags": ["系统设置"],
        "summary": "重置管理员密码",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": { "id": { "type": "string", "example": "A02" } },
                "required": ["id"]
              }
            }
          }
        },
        "responses": { "200": { "description": "成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponse" } } } } }
      }
    },
    "/admin/system/op-logs": {
      "get": {
        "tags": ["系统设置"],
        "summary": "操作日志列表",
        "parameters": [
          { "name": "kw", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "date", "in": "query", "required": false, "schema": { "type": "string" }, "description": "日期（yyyy-MM-dd）" },
          { "name": "page", "in": "query", "required": false, "schema": { "type": "integer" } },
          { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer" } }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": { "type": "integer", "example": 200 },
                    "message": { "type": "string", "example": "ok" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "list": { "type": "array", "items": { "$ref": "#/components/schemas/OpLogItem" } },
                        "total": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SuccessResponse": {
        "type": "object",
        "properties": {
          "code": { "type": "integer", "example": 200 },
          "message": { "type": "string", "example": "ok" },
          "data": { "type": "object", "properties": { "success": { "type": "boolean", "example": true } } }
        }
      },
      "ListResponse": {
        "type": "object",
        "properties": {
          "code": { "type": "integer", "example": 200 },
          "message": { "type": "string", "example": "ok" },
          "data": {
            "type": "object",
            "properties": {
              "list": { "type": "array", "items": { "$ref": "#/components/schemas/BizOrderItem" } },
              "total": { "type": "integer" }
            }
          }
        }
      },
      "DashboardStats": {
        "type": "object",
        "properties": {
          "todayOrder": { "type": "integer", "description": "今日订单总数", "example": 5 },
          "inProgress": { "type": "integer", "description": "进行中订单", "example": 25 },
          "todayAmount": { "type": "number", "description": "今日成交额", "example": 1178.8 },
          "totalAmount": { "type": "number", "description": "总成交额", "example": 1387.8 },
          "userCount": { "type": "integer", "example": 6 },
          "companionCount": { "type": "integer", "example": 8 },
          "userDau": { "type": "integer", "example": 1286 },
          "companionDau": { "type": "integer", "example": 142 },
          "trend": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": { "type": "string", "example": "2026-08-11" },
                "label": { "type": "string", "example": "08-11" },
                "count": { "type": "integer", "example": 2 }
              }
            }
          },
          "todos": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": { "type": "string", "example": "待分配订单" },
                "value": { "type": "string", "example": "7 单" },
                "path": { "type": "string", "example": "/order/biz-orders" }
              }
            }
          }
        }
      },
      "BizOrderItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "PZ20260807001" },
          "serviceId": { "type": "integer", "example": 0 },
          "serviceName": { "type": "string", "description": "服务名称（后端联表补充）", "example": "2小时基础陪诊" },
          "status": { "type": "string", "enum": ["unpaid", "pending", "assigned", "serving", "done", "cancel", "refunding", "refunded"] },
          "date": { "type": "string", "example": "2026-08-07 10:00" },
          "paidAt": { "type": "string" },
          "completeDate": { "type": "string" },
          "hospital": { "type": "string", "example": "北京协和医院" },
          "remark": { "type": "string" },
          "user": {
            "type": "object",
            "properties": {
              "name": { "type": "string", "example": "林女士" },
              "phone": { "type": "string", "example": "139****2048" },
              "avatar": { "type": "string", "example": "👩" }
            }
          },
          "price": { "type": "number", "example": 178.2 },
          "nightFee": { "type": "number", "description": "夜间服务费" },
          "carFee": { "type": "number", "description": "接送服务费" },
          "couponDiscount": { "type": "number", "description": "优惠券抵扣" },
          "companion": {
            "type": ["object", "null"],
            "description": "已分配的陪诊师，未分配为 null",
            "properties": {
              "name": { "type": "string", "example": "李护士" },
              "avatar": { "type": "string", "example": "👩" },
              "rating": { "type": "number", "example": 4.9 },
              "count": { "type": "integer", "example": 328 },
              "phone": { "type": "string", "example": "13800138001" }
            }
          },
          "progress": {
            "type": "array",
            "description": "服务进度时间线",
            "items": {
              "type": "object",
              "properties": {
                "time": { "type": "string", "example": "2026-08-07 09:00" },
                "text": { "type": "string", "example": "陪诊师已出发前往医院" },
                "type": { "type": "string", "example": "companion" },
                "img": { "type": "string" }
              }
            }
          },
          "addOns": {
            "type": "array",
            "description": "追加服务",
            "items": {
              "type": "object",
              "properties": {
                "name": { "type": "string", "example": "延长服务 1小时" },
                "price": { "type": "number", "example": 68 },
                "paidAt": { "type": "string" }
              }
            }
          }
        }
      },
      "PayOrderItem": {
        "type": "object",
        "properties": {
          "payId": { "type": "string", "example": "WX20260806194201" },
          "bizOrderId": { "type": "string", "example": "PZ20260807001" },
          "channel": { "type": "string", "example": "微信支付" },
          "amount": { "type": "number", "example": 178.2 },
          "status": { "type": "string", "enum": ["成功", "失败", "处理中"] },
          "payTime": { "type": "string", "example": "2026-08-06 19:42" }
        }
      },
      "CouponPackOrderItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "PKO20260817001" },
          "packName": { "type": "string", "example": "新人专享券包" },
          "qty": { "type": "integer", "example": 1 },
          "user": { "type": "string", "example": "林女士" },
          "phone": { "type": "string", "example": "139****2048" },
          "amount": { "type": "number", "example": 9.9 },
          "channel": { "type": "string", "example": "微信支付" },
          "status": { "type": "string", "enum": ["已支付", "已退款"] },
          "payTime": { "type": "string", "example": "2026-08-17 11:02" }
        }
      },
      "AddonOrderItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "AD1001" },
          "parent": { "type": "string", "description": "父业务订单号", "example": "PZ20260807001" },
          "name": { "type": "string", "example": "延长服务 1小时" },
          "price": { "type": "number", "example": 68 },
          "paidAt": { "type": "string", "example": "2026-08-07 10:20" },
          "user": { "type": "string", "example": "林女士" },
          "phone": { "type": "string", "example": "139****2048" },
          "status": { "type": "string", "example": "已支付" }
        }
      },
      "CompanionItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "ES001" },
          "openid": { "type": "string", "example": "oRxYz1aBc2DeF3gH4iJ5k" },
          "nickname": { "type": "string", "example": "小南风" },
          "name": { "type": "string", "description": "真实姓名，认证通过后回填", "example": "李护士" },
          "phone": { "type": "string", "example": "13800138001" },
          "avatar": { "type": "string", "example": "👩" },
          "gender": { "type": "string", "description": "性别", "enum": ["男", "女"], "example": "女" },
          "idCard": { "type": "string", "example": "1101**********2048" },
          "cert": { "type": "string", "description": "资质证书", "example": "护士执业资格证" },
          "certImg": { "type": "boolean", "example": true },
          "city": { "type": "string", "example": "北京市 北京市" },
          "rating": { "type": "number", "example": 4.9 },
          "count": { "type": "integer", "example": 328 },
          "banned": { "type": "boolean", "example": false },
          "certStatus": { "type": "string", "enum": ["待审核", "已通过", "已拒绝"], "example": "已通过" },
          "regTime": { "type": "string", "example": "2026-03-02" }
        }
      },
      "ConsultItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "CQ001" },
          "name": { "type": "string", "example": "吴女士" },
          "gender": { "type": "string", "example": "女" },
          "phone": { "type": "string", "example": "13798878820" },
          "phoneMask": { "type": "string", "example": "137****8820" },
          "city": { "type": "string", "example": "浙江省 杭州市" },
          "status": { "type": "string", "enum": ["待处理", "已处理"] }
        }
      },
      "UserItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "U10001" },
          "nickname": { "type": "string", "example": "林女士" },
          "name": { "type": "string", "example": "林晓梅" },
          "phone": { "type": "string", "example": "139****2048" },
          "avatar": { "type": "string", "example": "👩" },
          "regTime": { "type": "string", "example": "2026-03-12" },
          "isMember": { "type": "boolean", "example": true },
          "memberTier": { "type": "string", "example": "黄金会员" },
          "status": { "type": "string", "enum": ["正常", "冻结"] }
        }
      },
      "CityPrice": {
        "type": "object",
        "description": "城市等级价格（售价 / 划线价）",
        "properties": {
          "price": { "type": "number", "description": "售价（元）", "example": 198 },
          "linePrice": { "type": "number", "description": "划线价（元）", "example": 228 }
        }
      },
      "ServiceItem": {
        "type": "object",
        "properties": {
          "id": { "type": "integer", "example": 0 },
          "name": { "type": "string", "example": "2小时基础陪诊" },
          "brief": { "type": "string", "example": "专业陪诊师全程陪同，协助挂号候诊取药" },
          "price": { "type": "number", "example": 198 },
          "linePrice": { "type": "number", "description": "划线价", "example": 228 },
          "sold": { "type": "integer", "example": 2341 },
          "fakeBase": { "type": "integer", "description": "服务次数基数（展示 = fakeBase + sold）", "example": 8000 },
          "tags": { "type": "array", "items": { "type": "string" }, "example": ["热门", "优选"] },
          "icon": { "type": "string", "example": "🏥" },
          "color": { "type": "string", "example": "linear-gradient(135deg,#3EB489,#2D9CDB)" },
          "desc": { "type": "string", "description": "服务详情" },
          "guarantee": { "type": "string", "description": "服务保障" },
          "notice": { "type": "string", "description": "服务须知" },
          "online": { "type": "boolean", "example": true },
          "weight": { "type": "integer", "example": 1 },
          "duration": { "type": "string", "example": "2小时" },
          "thumbFile": { "type": "string", "description": "缩略图文件名" },
          "thirdParty": { "type": "string", "description": "第三方商品 ID" },
          "giftIds": { "type": "array", "items": { "type": "string" }, "example": ["G01"] },
          "addonIds": { "type": "array", "items": { "type": "string" }, "example": ["A01", "A02"] },
          "carousel": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "icon": { "type": "string", "example": "🏥" },
                "color": { "type": "string" },
                "url": { "type": "string" },
                "file": { "type": "string" }
              }
            }
          },
          "cityPrices": {
            "type": "object",
            "description": "三档城市等级价格（tier1 一线 / tier2 二线 / tier3 三线），保存后 price 同步为一线售价",
            "properties": {
              "tier1": { "$ref": "#/components/schemas/CityPrice" },
              "tier2": { "$ref": "#/components/schemas/CityPrice" },
              "tier3": { "$ref": "#/components/schemas/CityPrice" }
            }
          }
        }
      },
      "GiftItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "G01" },
          "name": { "type": "string", "example": "平安保险50万意外保障" },
          "qty": { "type": "integer", "example": 1 }
        }
      },
      "AddonItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "A01" },
          "name": { "type": "string", "example": "延长服务 1小时" },
          "price": { "type": "number", "example": 68 },
          "duration": { "type": "string", "example": "1小时" }
        }
      },
      "SelfCityItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "C1" },
          "name": { "type": "string", "description": "格式「省 市」，直辖市为城市名", "example": "福建省 福州市" }
        }
      },
      "CouponItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "C001" },
          "name": { "type": "string", "example": "满100减20元" },
          "type": { "type": "string", "description": "券类型：满减 / 立减", "example": "满减" },
          "amount": { "type": "number", "description": "优惠金额（元）", "example": 20 },
          "threshold": { "type": "number", "description": "使用门槛金额，0 表示无门槛", "example": 100 },
          "total": { "type": "integer", "description": "发放总量", "example": 5000 },
          "claimed": { "type": "integer", "description": "已领取数量", "example": 3240 },
          "used": { "type": "integer", "description": "已使用数量", "example": 1890 },
          "validType": { "type": "string", "description": "有效期类型：固定时段 / 领取后N天", "example": "固定时段" },
          "validEnd": { "type": "string", "description": "有效截止时间，固定时段时为日期，领取后N天为「—」", "example": "2026-12-31" },
          "status": { "type": "string", "description": "启用 / 停用", "enum": ["启用", "停用"], "example": "启用" }
        }
      },
      "CouponCodeItem": {
        "type": "object",
        "properties": {
          "codeId": { "type": "string", "example": "C001-1" },
          "couponId": { "type": "string", "example": "C001" },
          "code": { "type": "string", "example": "XTKJ-001-1" },
          "genTime": { "type": "string", "example": "2026-08-01 09:12" },
          "status": { "type": "string", "description": "未兑换 / 已兑换 / 已使用 / 已作废", "enum": ["未兑换", "已兑换", "已使用", "已作废"], "example": "未兑换" }
        }
      },
      "CouponPackItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "PK01" },
          "name": { "type": "string", "example": "新人专享券包" },
          "subtitle": { "type": "string", "example": "5张券 · 立省70元" },
          "price": { "type": "number", "example": 9.9 },
          "limitQty": { "type": "integer", "description": "每人限购次数，0 表示不限购", "example": 1 },
          "notice": { "type": "string", "description": "购买须知" },
          "status": { "type": "string", "description": "上架 / 下架", "enum": ["上架", "下架"], "example": "上架" },
          "coupons": {
            "type": "array",
            "description": "券包内包含的优惠券及数量",
            "items": {
              "type": "object",
              "properties": {
                "coupon": { "type": "string", "description": "优惠券名称", "example": "满100减20元" },
                "qty": { "type": "integer", "example": 1 }
              }
            }
          }
        }
      },
      "CouponUsageItem": {
        "type": "object",
        "properties": {
          "user": { "type": "string", "example": "林女士" },
          "phone": { "type": "string", "example": "139****2048" },
          "couponName": { "type": "string", "example": "满100减20元" },
          "orderId": { "type": "string", "example": "PZ20260807001" },
          "useTime": { "type": "string", "example": "2026-08-06 19:40" },
          "amount": { "type": "number", "description": "优惠金额（元）", "example": 20 }
        }
      },
      "BannerItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "B01" },
          "img": { "type": "string", "example": "banner_01.png" },
          "url": { "type": "string", "description": "跳转链接", "example": "/pages/membership" },
          "weight": { "type": "integer", "description": "排序权重，越小越靠前", "example": 1 },
          "pos": { "type": "string", "description": "投放位置：用户端-首页 / 陪诊师端-首页", "example": "用户端-首页" },
          "status": { "type": "string", "description": "生效 / 失效", "enum": ["生效", "失效"], "example": "生效" }
        }
      },
      "ArticleItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "A1" },
          "title": { "type": "string", "example": "小袋鼠绿通用户协议" },
          "pos": { "type": "string", "description": "文章位置：用户端-用户协议 / 隐私政策 / 服务指南 / 帮助中心，陪诊师端-入驻须知 / 服务规范", "example": "用户端-用户协议" },
          "content": { "type": "string", "description": "文章正文" },
          "status": { "type": "string", "description": "上线 / 下线", "enum": ["上线", "下线"], "example": "上线" },
          "updated": { "type": "string", "example": "2026-08-10 14:20" }
        }
      },
      "AdminItem": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "example": "A01" },
          "account": { "type": "string", "example": "admin" },
          "name": { "type": "string", "example": "超级管理员" },
          "role": { "type": "string", "example": "超级管理员" },
          "lastIp": { "type": "string", "example": "192.168.1.100" },
          "status": { "type": "string", "description": "启用 / 停用", "enum": ["启用", "停用"], "example": "启用" },
          "lastLogin": { "type": "string", "example": "2026-08-17 09:12" }
        }
      },
      "OpLogItem": {
        "type": "object",
        "properties": {
          "time": { "type": "string", "example": "2026-08-17 09:12" },
          "admin": { "type": "string", "example": "admin" },
          "ip": { "type": "string", "example": "192.168.1.100" },
          "action": { "type": "string", "example": "登录管理后台" }
        }
      }
    }
  }
}