{
  "openapi": "3.0.3",
  "info": {
    "title": "Vion Platform Masterdata Web API",
    "version": "0.1.0",
    "description": "**中文**\n\nVion 7.0 平台 Masterdata 模块的 Web 页面接口契约，涵盖租户主档、组织单元、场所、空间、平面图、布局、槽位与商品陈列。双键实体的对外 *Id 字段使用不可变 uid。\n\n**English**\n\nVion 7.0 platform Masterdata Web API contract covering tenant master records, org units, sites, spaces, plans, layouts, slots and product display. External *Id fields for dual-key entities use immutable UIDs."
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "masterdata",
      "description": "**中文**\n\n租户主档、组织单元、场所、空间、平面图、布局、槽位与商品陈列\n\n**English**\n\nTenant master records, org units, sites, spaces, plans, layouts, slots and product display"
    }
  ],
  "x-doc-groups": [
    {
      "id": "tenants",
      "title": "租户主档 / Tenant Master Records",
      "operations": [
        "listTenants",
        "getTenant"
      ]
    },
    {
      "id": "org-unit-types",
      "title": "组织单元类型 / Org Unit Types",
      "operations": [
        "listOrgUnitTypes"
      ]
    },
    {
      "id": "org-units",
      "title": "组织单元 / Org Units",
      "operations": [
        "listOrgUnits",
        "getOrgUnit",
        "createOrgUnit",
        "updateOrgUnit",
        "deleteOrgUnit"
      ]
    },
    {
      "id": "sites",
      "title": "经营场所 / Sites",
      "operations": [
        "listSites",
        "getSite",
        "createSite",
        "updateSite"
      ]
    },
    {
      "id": "space-types",
      "title": "空间类型与包含规则 / Space Types and Containment Rules",
      "operations": [
        "listSpaceTypes"
      ]
    },
    {
      "id": "spaces",
      "title": "空间 / Spaces",
      "operations": [
        "listSiteSpaces",
        "getSpace",
        "createSpace",
        "updateSpace",
        "deleteSpace"
      ]
    },
    {
      "id": "space-plans",
      "title": "空间图纸 / Space Plans",
      "operations": [
        "listSitePlans",
        "getPlan",
        "getPlanImage",
        "createPlan",
        "updatePlan",
        "replacePlan",
        "deletePlan"
      ]
    },
    {
      "id": "space-layouts",
      "title": "空间摆放配置 / Space Layouts",
      "operations": [
        "listPlanLayouts",
        "savePlanLayouts"
      ]
    },
    {
      "id": "slots",
      "title": "空间槽位 / Space Slots",
      "operations": [
        "listSpaceSlots"
      ]
    },
    {
      "id": "slot-products",
      "title": "槽位商品关系 / Slot Product Bindings",
      "operations": [
        "listSlotProducts",
        "bindSlotProduct",
        "unbindSlotProduct"
      ]
    },
    {
      "id": "products",
      "title": "商品 / Products",
      "operations": [
        "listProducts"
      ]
    },
    {
      "id": "regions",
      "title": "行政区划 / Administrative Regions",
      "operations": [
        "listRegions"
      ]
    }
  ],
  "paths": {
    "/api/platform/masterdata/tenants": {
      "get": {
        "operationId": "listTenants",
        "tags": [
          "masterdata"
        ],
        "summary": "查询调用方可见的租户 / List tenants visible to the caller",
        "description": "**中文**\n\n返回当前主体可访问的租户主档。平台超管可查询跨租户列表。\n\n**English**\n\nReturn tenant master records accessible to the current principal. Platform administrators may query the cross-tenant directory.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n可见租户列表\n\n**English**\n\nList of visible tenants",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "tenantCode": "hxl-demo",
                            "name": "好想来示例租户",
                            "defaultTimezone": "Asia/Shanghai",
                            "firstDayOfWeek": 1,
                            "status": "ACTIVE"
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440324"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/platform/masterdata/tenants/{tenantId}": {
      "get": {
        "operationId": "getTenant",
        "tags": [
          "masterdata"
        ],
        "summary": "查询可见租户的主档编辑详情 / Read visible tenant master record details for editing",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n待查询的可见租户 ID。\n\n**English**\n\nID of the visible tenant to read."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n租户主档\n\n**English**\n\nTenant master record",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "tenantId": "01a2319e-2164-7715-bb2b-bbcaaf55baab",
                        "tenantCode": "hxl-pending",
                        "name": "待开通的示例租户",
                        "nameI18n": {},
                        "defaultTimezone": "Asia/Shanghai",
                        "firstDayOfWeek": 1,
                        "status": "PENDING"
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440325"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "**中文**\n\n按调用方可见范围读取租户主档，返回基础名称及完整翻译字典供编辑使用。\n\n**English**\n\nRead the tenant master record within the caller's visible scope, returning the base name and complete translation dictionary for editing."
      }
    },
    "/api/platform/masterdata/org-unit-types": {
      "get": {
        "operationId": "listOrgUnitTypes",
        "tags": [
          "masterdata"
        ],
        "summary": "查询当前租户的组织单元类型选项 / List org unit type options for the current tenant",
        "description": "**中文**\n\n按 typeCode 合并平台预置与当前租户的类型，同编码时以租户定义为准。返回生效且启用的类型及本地化名称，按 sortOrder、typeCode 升序排列。\n\n**English**\n\nMerge platform built-in types and current-tenant types by typeCode, with the tenant definition taking precedence when codes match. Return effective and enabled types and their localized names, sorted by sortOrder and typeCode in ascending order.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n组织单元类型选项列表\n\n**English**\n\nList of org unit type options",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgUnitTypeListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "typeCode": "HEADQUARTERS",
                            "name": "总部",
                            "isBuiltin": true,
                            "sortOrder": 10
                          },
                          {
                            "typeCode": "REGION",
                            "name": "大区",
                            "isBuiltin": true,
                            "sortOrder": 20
                          },
                          {
                            "typeCode": "BRANCH",
                            "name": "分公司",
                            "isBuiltin": true,
                            "sortOrder": 30
                          },
                          {
                            "typeCode": "DISTRICT",
                            "name": "片区",
                            "isBuiltin": false,
                            "sortOrder": 40
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440305"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/platform/masterdata/org-units": {
      "get": {
        "operationId": "listOrgUnits",
        "tags": [
          "masterdata"
        ],
        "summary": "查询当前租户组织单元列表 / List org units in the current tenant",
        "description": "**中文**\n\n返回当前租户的组织树。条目使用 parentId 表示父节点。\n\n**English**\n\nReturn the org unit tree of the current tenant. Each item identifies its parent node using parentId.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n组织单元列表\n\n**English**\n\nList of org units",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgUnitListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "orgUnitId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "parentId": null,
                            "code": "HQ",
                            "name": "总部",
                            "typeCode": "HEADQUARTERS",
                            "sortOrder": 0,
                            "status": 1
                          },
                          {
                            "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "parentId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                            "code": "EAST",
                            "name": "华东大区",
                            "typeCode": "REGION",
                            "sortOrder": 1,
                            "status": 1
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440301"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "operationId": "createOrgUnit",
        "tags": [
          "masterdata"
        ],
        "summary": "新增组织单元 / Create an org unit",
        "description": "**中文**\n\nMasterdata 在同一事务内写入新节点和组织闭包，包含节点自身行。\n\n**English**\n\nMasterdata writes the new node and its org unit closure records in the same transaction, including the self-referential closure row.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveOrgUnitRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "parentId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                    "code": "SOUTH",
                    "name": "South Region",
                    "nameI18n": {
                      "zh-CN": "华南大区"
                    },
                    "typeCode": "REGION",
                    "sortOrder": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n新建组织单元\n\n**English**\n\nNewly created org unit",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgUnitEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "orgUnitId": "01a2319e-216a-753a-9629-ff06996d5f9f",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "parentId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                        "code": "SOUTH",
                        "name": "South Region",
                        "nameI18n": {
                          "zh-CN": "华南大区"
                        },
                        "typeCode": "REGION",
                        "sortOrder": 2,
                        "status": 1
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440302"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/platform/masterdata/org-units/{orgUnitId}": {
      "get": {
        "operationId": "getOrgUnit",
        "tags": [
          "masterdata"
        ],
        "summary": "查询组织单元编辑详情 / Read org unit details for editing",
        "parameters": [
          {
            "name": "orgUnitId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n当前租户内目标组织单元 ID。\n\n**English**\n\nID of the target org unit within the current tenant."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n组织单元详情\n\n**English**\n\nOrg unit details",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgUnitEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "orgUnitId": "01a2319e-216a-753a-9629-ff06996d5f9f",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "parentId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                        "code": "SOUTH",
                        "name": "South Region",
                        "nameI18n": {
                          "zh-CN": "华南大区"
                        },
                        "typeCode": "REGION",
                        "sortOrder": 2,
                        "status": 1
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440320"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "**中文**\n\n读取当前租户的组织单元主档，返回基础名称及完整翻译字典供编辑使用。\n\n**English**\n\nRead the org unit master record within the current tenant, returning the base name and complete translation dictionary for editing."
      }
    },
    "/api/platform/masterdata/org-units/{orgUnitId}/update": {
      "post": {
        "operationId": "updateOrgUnit",
        "tags": [
          "masterdata"
        ],
        "summary": "更新组织单元或移动子树 / Update an org unit or move its subtree",
        "description": "**中文**\n\n提交组织单元的完整可编辑字段。parentId 为空或省略时表示根节点。Masterdata 校验父节点同租户且无环，在同一事务内更新受影响子树的闭包。\n\n**English**\n\nSubmit the full editable fields of the org unit. A null or omitted parentId represents a root node. Masterdata validates that the parent belongs to the same tenant and that no cycle is introduced, then updates the closure records of the affected subtree in the same transaction.",
        "parameters": [
          {
            "name": "orgUnitId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n当前租户内目标组织单元 ID。\n\n**English**\n\nID of the target org unit within the current tenant."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrgUnitRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "parentId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                    "code": "SOUTH",
                    "name": "South Region",
                    "nameI18n": {
                      "zh-CN": "华南营运区"
                    },
                    "typeCode": "REGION",
                    "sortOrder": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n更新后的组织单元\n\n**English**\n\nUpdated org unit",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgUnitEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "orgUnitId": "01a2319e-216a-753a-9629-ff06996d5f9f",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "parentId": "01a2319e-2167-7240-bc32-25ea256e47e8",
                        "code": "SOUTH",
                        "name": "South Region",
                        "nameI18n": {
                          "zh-CN": "华南营运区"
                        },
                        "typeCode": "REGION",
                        "sortOrder": 2,
                        "status": 1
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440321"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/platform/masterdata/org-units/{orgUnitId}/delete": {
      "post": {
        "operationId": "deleteOrgUnit",
        "tags": [
          "masterdata"
        ],
        "summary": "删除空组织单元 / Delete an empty org unit",
        "description": "**中文**\n\n仅允许删除没有下级组织、场所及配置引用的组织单元。存在引用时返回 409，事务内同步维护闭包。\n\n**English**\n\nAn org unit can be deleted only if it has no child org units, sites or configuration references. Existing references yield 409. Maintain the closure in the same transaction.",
        "parameters": [
          {
            "name": "orgUnitId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标组织单元 UID。\n\n**English**\n\nUID of the target org unit."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n删除结果\n\n**English**\n\nDeletion result",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteOrgUnitEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "orgUnitId": "01a2319e-216a-753a-9629-ff06996d5f9f",
                        "deleted": true
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440322"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/platform/masterdata/sites": {
      "get": {
        "operationId": "listSites",
        "tags": [
          "masterdata"
        ],
        "summary": "查询当前用户授权范围内的场所列表 / List sites within the current user's authorized scope",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          },
          {
            "name": "orgUnitId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n按组织单元 UID 筛选场所；是否包含其子树由 includeDescendants 决定。\n\n**English**\n\nFilter sites by org unit UID. includeDescendants determines whether its subtree is included."
          },
          {
            "name": "includeDescendants",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n指定 orgUnitId 时是否包含其下级组织。\n\n**English**\n\nWhether to include descendant org units when orgUnitId is specified.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "directOnly",
            "in": "query",
            "required": false,
            "description": "**中文**\n\ntrue 时仅返回 orgUnitId 为空的直属租户场所，不可同时指定 orgUnitId。\n\n**English**\n\nWhen true, return only tenant-direct sites with null orgUnitId; cannot be combined with orgUnitId.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n按场所基础名称或业务编码搜索。\n\n**English**\n\nSearch by site base name or business code.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "operatingStatus",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n按场所经营状态筛选。\n\n**English**\n\nFilter by site operating status.",
            "schema": {
              "$ref": "#/components/schemas/OperatingStatus"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 20
            },
            "description": "**中文**\n\n本页最多返回的记录条数。\n\n**English**\n\nMaximum number of records returned in this page."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "**中文**\n\n本页之前跳过的记录条数。\n\n**English**\n\nNumber of records skipped before this page."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n分页场所列表\n\n**English**\n\nPaginated list of sites",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SitePageEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                            "siteCode": "SH-001",
                            "name": "上海示例店",
                            "siteType": "STORE",
                            "timezone": "Asia/Shanghai",
                            "operatingStatus": "OPERATING"
                          },
                          {
                            "siteId": "01a2319e-2165-70ab-b75b-605a7196c4c1",
                            "orgUnitId": null,
                            "siteCode": "SH-003",
                            "name": "上海直属示例店",
                            "siteType": "STORE",
                            "operatingStatus": "CLOSED",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "timezone": "Asia/Shanghai"
                          }
                        ],
                        "page": {
                          "limit": 20,
                          "offset": 0,
                          "hasMore": false,
                          "total": 2
                        }
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440305"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "**中文**\n\n按当前用户数据范围返回场所（含待开业、营业和闭店）。orgUnitId 为空且 directOnly 为 true 时仅查询直属租户场所。指定组织时 includeDescendants 默认 true；为 false 时仅查直属该组织的场所。\n\n**English**\n\nReturn sites in the current user's data scope, including pre-opening, operating and closed sites. When orgUnitId is absent and directOnly is true, return only tenant-direct sites. When an org unit is specified, includeDescendants defaults to true; false limits results to sites directly under that org unit."
      },
      "post": {
        "operationId": "createSite",
        "tags": [
          "masterdata"
        ],
        "summary": "新增经营场所 / Create a site",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveSiteRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                    "siteCode": "SH-002",
                    "name": "上海新店",
                    "nameI18n": {},
                    "siteType": "STORE",
                    "timezone": "Asia/Shanghai",
                    "provinceId": "310000",
                    "cityId": "310100",
                    "address": "上海市浦东新区示例路 100 号",
                    "operatingStatus": "PRE_OPENING",
                    "weeklyBusinessHours": [
                      {
                        "dayOfWeek": 1,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 2,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 3,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 4,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 5,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 6,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "12:00",
                            "endNextDay": false
                          },
                          {
                            "startTime": "18:00",
                            "endTime": "01:00",
                            "endNextDay": true
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 7,
                        "isClosed": true,
                        "segments": []
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n新建场所结果\n\n**English**\n\nNewly created site",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "siteId": "01a2319e-216a-753a-9629-ff07e738497b",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                        "siteCode": "SH-002",
                        "name": "上海新店",
                        "nameI18n": {},
                        "siteType": "STORE",
                        "timezone": "Asia/Shanghai",
                        "operatingStatus": "PRE_OPENING",
                        "weeklyBusinessHours": [
                          {
                            "dayOfWeek": 1,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 2,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 3,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 4,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 5,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 6,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "12:00",
                                "endNextDay": false
                              },
                              {
                                "startTime": "18:00",
                                "endTime": "01:00",
                                "endNextDay": true
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 7,
                            "isClosed": true,
                            "segments": []
                          }
                        ],
                        "metricConfig": {}
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440306"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        },
        "description": "**中文**\n\n新建场所，可直属租户或挂到同租户组织。提交周一至周日完整营业时间，未指定经营状态时默认为 OPERATING。\n\n**English**\n\nCreate a site belonging directly to the tenant or to an org unit in the same tenant. Submit complete business hours for Monday through Sunday. Operating status defaults to OPERATING if omitted."
      }
    },
    "/api/platform/masterdata/sites/{siteId}": {
      "get": {
        "operationId": "getSite",
        "tags": [
          "masterdata"
        ],
        "summary": "查询场所完整编辑详情 / Read complete site details for editing",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标经营场所 ID。\n\n**English**\n\nID of the target site."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n场所详情\n\n**English**\n\nSite details",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                        "siteCode": "SH-001",
                        "name": "上海示例店",
                        "nameI18n": {},
                        "siteType": "STORE",
                        "timezone": "Asia/Shanghai",
                        "provinceId": "310000",
                        "cityId": "310100",
                        "operatingStatus": "OPERATING",
                        "weeklyBusinessHours": [
                          {
                            "dayOfWeek": 1,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 2,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 3,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 4,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 5,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 6,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "12:00",
                                "endNextDay": false
                              },
                              {
                                "startTime": "18:00",
                                "endTime": "01:00",
                                "endNextDay": true
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 7,
                            "isClosed": true,
                            "segments": []
                          }
                        ],
                        "metricConfig": {}
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440331"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "**中文**\n\n读取场所主档及其配置，返回基础名称和完整翻译字典供编辑使用。\n\n**English**\n\nRead the site master record and its configuration, returning the base name and complete translation dictionary for editing."
      }
    },
    "/api/platform/masterdata/sites/{siteId}/update": {
      "post": {
        "operationId": "updateSite",
        "tags": [
          "masterdata"
        ],
        "summary": "更新场所资料 / Update site profile",
        "description": "**中文**\n\n提交必填资料及完整 nameI18n。orgUnitId 为空或省略时表示直属租户。省略可选场所资料、每周营业时间或指标口径时保留现有值，提供对应值时替换。闭店仍保留主档、配置和历史数据。变更营业时间或指标口径时服务端同步维护配置历史。\n\n**English**\n\nSubmit required information and the complete nameI18n dictionary. A null or omitted orgUnitId denotes a tenant-direct site. Omitted optional site information, weekly business hours or metric configuration retains existing values; provided values replace them. Closed sites retain their master records, configuration and historical data. The server maintains configuration history when business hours or metric configuration changes.",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标经营场所 ID。\n\n**English**\n\nID of the target site."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSiteRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                    "siteCode": "SH-001",
                    "name": "上海示例店浦东店",
                    "nameI18n": {},
                    "siteType": "STORE",
                    "timezone": "Asia/Shanghai",
                    "provinceId": "310000",
                    "cityId": "310100",
                    "operatingStatus": "OPERATING",
                    "weeklyBusinessHours": [
                      {
                        "dayOfWeek": 1,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 2,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 3,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 4,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 5,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "22:00",
                            "endNextDay": false
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 6,
                        "isClosed": false,
                        "segments": [
                          {
                            "startTime": "09:00",
                            "endTime": "12:00",
                            "endNextDay": false
                          },
                          {
                            "startTime": "18:00",
                            "endTime": "01:00",
                            "endNextDay": true
                          }
                        ]
                      },
                      {
                        "dayOfWeek": 7,
                        "isClosed": true,
                        "segments": []
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n更新后的场所\n\n**English**\n\nUpdated site",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "orgUnitId": "01a2319e-215e-74f1-b5e0-b964d945b260",
                        "siteCode": "SH-001",
                        "name": "上海示例店浦东店",
                        "nameI18n": {},
                        "siteType": "STORE",
                        "timezone": "Asia/Shanghai",
                        "provinceId": "310000",
                        "cityId": "310100",
                        "operatingStatus": "OPERATING",
                        "weeklyBusinessHours": [
                          {
                            "dayOfWeek": 1,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 2,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 3,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 4,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 5,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "22:00",
                                "endNextDay": false
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 6,
                            "isClosed": false,
                            "segments": [
                              {
                                "startTime": "09:00",
                                "endTime": "12:00",
                                "endNextDay": false
                              },
                              {
                                "startTime": "18:00",
                                "endTime": "01:00",
                                "endNextDay": true
                              }
                            ]
                          },
                          {
                            "dayOfWeek": 7,
                            "isClosed": true,
                            "segments": []
                          }
                        ],
                        "metricConfig": {}
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440332"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/platform/masterdata/space-types": {
      "get": {
        "operationId": "listSpaceTypes",
        "tags": [
          "masterdata"
        ],
        "summary": "查询当前租户的空间类型和包含规则 / List space types and containment rules for the current tenant",
        "description": "**中文**\n\n按 typeCode 与 parentType/childType 合并平台预置及租户定义。同编码或同关系以租户记录为准，停用项抑制平台定义。返回生效类型的本地化名称、属性模板及允许关系，含 SITE 根级规则。类型按 sortOrder、typeCode 升序排列。\n\n**English**\n\nMerge platform built-ins and tenant definitions by typeCode and parentType/childType. Tenant records take precedence for matching codes or relationships; disabled tenant entries suppress platform definitions. Return localized names, attribute templates and permitted relationships for effective types, including SITE root-level rules. Types are ordered by sortOrder and typeCode ascending.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n空间类型及允许的包含规则\n\n**English**\n\nSpace types and permitted containment rules",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceTypeListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "typeCode": "building",
                            "name": "Building",
                            "category": "STRUCTURAL",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": true
                            },
                            "defaultAttrs": {},
                            "sortOrder": 10
                          },
                          {
                            "typeCode": "floor",
                            "name": "Floor",
                            "category": "STRUCTURAL",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "area_m2": {
                                  "type": "number",
                                  "minimum": 0
                                },
                                "business_purpose": {
                                  "type": "string"
                                },
                                "brand_name": {
                                  "type": "string"
                                },
                                "is_staff_area": {
                                  "type": "boolean"
                                },
                                "stayed_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "deep_visit_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "is_staff_area": false,
                              "stayed_threshold_sec": 5,
                              "deep_visit_threshold_sec": 30
                            },
                            "sortOrder": 20
                          },
                          {
                            "typeCode": "escalator",
                            "name": "Escalator",
                            "category": "PORTAL",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "flow_direction": {
                                  "type": "string",
                                  "enum": [
                                    "bidirectional",
                                    "entry_only",
                                    "exit_only"
                                  ]
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "flow_direction": "bidirectional"
                            },
                            "sortOrder": 30
                          },
                          {
                            "typeCode": "portal",
                            "name": "Portal",
                            "category": "PORTAL",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "flow_direction": {
                                  "type": "string",
                                  "enum": [
                                    "bidirectional",
                                    "entry_only",
                                    "exit_only"
                                  ]
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "flow_direction": "bidirectional"
                            },
                            "sortOrder": 40
                          },
                          {
                            "typeCode": "zone",
                            "name": "Zone",
                            "category": "ZONE",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "area_m2": {
                                  "type": "number",
                                  "minimum": 0
                                },
                                "business_purpose": {
                                  "type": "string"
                                },
                                "brand_name": {
                                  "type": "string"
                                },
                                "is_staff_area": {
                                  "type": "boolean"
                                },
                                "stayed_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "deep_visit_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "is_staff_area": false,
                              "stayed_threshold_sec": 5,
                              "deep_visit_threshold_sec": 30
                            },
                            "sortOrder": 50
                          },
                          {
                            "typeCode": "shop",
                            "name": "Shop",
                            "category": "ZONE",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "area_m2": {
                                  "type": "number",
                                  "minimum": 0
                                },
                                "business_purpose": {
                                  "type": "string"
                                },
                                "brand_name": {
                                  "type": "string"
                                },
                                "is_staff_area": {
                                  "type": "boolean"
                                },
                                "stayed_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "deep_visit_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "is_staff_area": false,
                              "stayed_threshold_sec": 5,
                              "deep_visit_threshold_sec": 30
                            },
                            "sortOrder": 60
                          },
                          {
                            "typeCode": "queue_area",
                            "name": "Queue Area",
                            "category": "ZONE",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "safe_num": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "warn_num": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "danger_num": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "wait_time_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "safe_num": 3,
                              "warn_num": 5,
                              "danger_num": 8,
                              "wait_time_threshold_sec": 120
                            },
                            "sortOrder": 70
                          },
                          {
                            "typeCode": "checkout_counter",
                            "name": "Checkout Counter",
                            "category": "FIXTURE",
                            "supportsSlot": false,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "counter_type": {
                                  "type": "string"
                                },
                                "safe_num": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "warn_num": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "danger_num": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "wait_time_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "safe_num": 3,
                              "warn_num": 5,
                              "danger_num": 8,
                              "wait_time_threshold_sec": 120
                            },
                            "sortOrder": 80
                          },
                          {
                            "typeCode": "shelf",
                            "name": "Shelf",
                            "category": "FIXTURE",
                            "supportsSlot": true,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "shelf_kind": {
                                  "type": "string",
                                  "enum": [
                                    "gondola",
                                    "wall",
                                    "endcap"
                                  ]
                                },
                                "width_m": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "depth_m": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "height_m": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "elevation_count": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "tier_count": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "category_tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "stayed_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "deep_visit_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "stayed_threshold_sec": 5,
                              "deep_visit_threshold_sec": 30
                            },
                            "sortOrder": 90
                          },
                          {
                            "typeCode": "display_table",
                            "name": "Display Table",
                            "category": "FIXTURE",
                            "supportsSlot": true,
                            "isBuiltin": true,
                            "attrSchema": {
                              "type": "object",
                              "properties": {
                                "table_kind": {
                                  "type": "string",
                                  "enum": [
                                    "island_bin",
                                    "experience_table"
                                  ]
                                },
                                "width_m": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "depth_m": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "height_m": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "elevation_count": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "tier_count": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "category_tags": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "stayed_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "deep_visit_threshold_sec": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "additionalProperties": true
                            },
                            "defaultAttrs": {
                              "stayed_threshold_sec": 5,
                              "deep_visit_threshold_sec": 30
                            },
                            "sortOrder": 100
                          }
                        ],
                        "relations": [
                          {
                            "parentType": "SITE",
                            "childType": "building",
                            "maxDepth": null
                          },
                          {
                            "parentType": "SITE",
                            "childType": "floor",
                            "maxDepth": null
                          },
                          {
                            "parentType": "SITE",
                            "childType": "escalator",
                            "maxDepth": null
                          },
                          {
                            "parentType": "SITE",
                            "childType": "zone",
                            "maxDepth": null
                          },
                          {
                            "parentType": "SITE",
                            "childType": "portal",
                            "maxDepth": null
                          },
                          {
                            "parentType": "SITE",
                            "childType": "queue_area",
                            "maxDepth": null
                          },
                          {
                            "parentType": "SITE",
                            "childType": "shelf",
                            "maxDepth": null
                          },
                          {
                            "parentType": "SITE",
                            "childType": "display_table",
                            "maxDepth": null
                          },
                          {
                            "parentType": "building",
                            "childType": "floor",
                            "maxDepth": null
                          },
                          {
                            "parentType": "building",
                            "childType": "escalator",
                            "maxDepth": null
                          },
                          {
                            "parentType": "floor",
                            "childType": "zone",
                            "maxDepth": null
                          },
                          {
                            "parentType": "floor",
                            "childType": "shop",
                            "maxDepth": null
                          },
                          {
                            "parentType": "floor",
                            "childType": "portal",
                            "maxDepth": null
                          },
                          {
                            "parentType": "floor",
                            "childType": "queue_area",
                            "maxDepth": null
                          },
                          {
                            "parentType": "floor",
                            "childType": "shelf",
                            "maxDepth": null
                          },
                          {
                            "parentType": "floor",
                            "childType": "display_table",
                            "maxDepth": null
                          },
                          {
                            "parentType": "shop",
                            "childType": "portal",
                            "maxDepth": null
                          },
                          {
                            "parentType": "shop",
                            "childType": "zone",
                            "maxDepth": null
                          },
                          {
                            "parentType": "shop",
                            "childType": "shelf",
                            "maxDepth": null
                          },
                          {
                            "parentType": "shop",
                            "childType": "display_table",
                            "maxDepth": null
                          },
                          {
                            "parentType": "shop",
                            "childType": "checkout_counter",
                            "maxDepth": null
                          },
                          {
                            "parentType": "zone",
                            "childType": "zone",
                            "maxDepth": 3
                          },
                          {
                            "parentType": "zone",
                            "childType": "portal",
                            "maxDepth": null
                          },
                          {
                            "parentType": "zone",
                            "childType": "queue_area",
                            "maxDepth": null
                          },
                          {
                            "parentType": "zone",
                            "childType": "shelf",
                            "maxDepth": null
                          },
                          {
                            "parentType": "zone",
                            "childType": "display_table",
                            "maxDepth": null
                          },
                          {
                            "parentType": "zone",
                            "childType": "checkout_counter",
                            "maxDepth": null
                          },
                          {
                            "parentType": "queue_area",
                            "childType": "checkout_counter",
                            "maxDepth": null
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440343"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    },
    "/api/platform/masterdata/sites/{siteId}/spaces": {
      "get": {
        "operationId": "listSiteSpaces",
        "tags": [
          "masterdata"
        ],
        "summary": "查询场所内的空间和设施 / List spaces and facilities within a site",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          },
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标经营场所 ID。\n\n**English**\n\nID of the target site."
          },
          {
            "name": "typeCode",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n按空间类型筛选。\n\n**English**\n\nFilter by space type.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "isSiteGate",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n按是否为场所外围出入口筛选。\n\n**English**\n\nFilter by whether the space is a site perimeter entrance or exit.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n场所空间列表\n\n**English**\n\nList of spaces within the site",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "spaceId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "parentId": null,
                            "path": "/01a2319e-216a-753a-9629-ff08bd70dfdd/",
                            "typeCode": "floor",
                            "name": "一层",
                            "status": 1,
                            "isSiteGate": false,
                            "sortOrder": 0
                          },
                          {
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "parentId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                            "path": "/01a2319e-216a-753a-9629-ff08bd70dfdd/01a2319e-2167-7240-bc32-25e7efb4b1e6/",
                            "typeCode": "shelf",
                            "code": "H1",
                            "name": "一号货架",
                            "status": 1,
                            "isSiteGate": false,
                            "sortOrder": 1
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440334"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "**中文**\n\n返回指定场所内的启用空间，使用 parentId 和 path 表达层级，可按空间类型和外围出入口标记筛选。\n\n**English**\n\nReturn enabled spaces within the specified site. parentId and path represent the hierarchy. Filter by space type and the site perimeter entrance or exit flag when supplied."
      },
      "post": {
        "operationId": "createSpace",
        "tags": [
          "masterdata"
        ],
        "summary": "在指定场所下新增空间或货架 / Create a space or shelf in the specified site",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标经营场所 ID。\n\n**English**\n\nID of the target site."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSpaceRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "parentId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                    "typeCode": "shelf",
                    "code": "H1",
                    "name": "一号货架",
                    "nameI18n": {},
                    "attrs": {
                      "shelf_kind": "gondola",
                      "elevation_count": 2,
                      "tier_count": 4
                    },
                    "isSiteGate": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n新建空间结果\n\n**English**\n\nNewly created space",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "parentId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                        "path": "/01a2319e-216a-753a-9629-ff08bd70dfdd/01a2319e-2167-7240-bc32-25e7efb4b1e6/",
                        "typeCode": "shelf",
                        "code": "H1",
                        "name": "一号货架",
                        "nameI18n": {},
                        "status": 1,
                        "isSiteGate": false,
                        "attrs": {
                          "shelf_kind": "gondola",
                          "elevation_count": 2,
                          "tier_count": 4
                        }
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440307"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        },
        "description": "**中文**\n\n创建空间及其属性，校验同场所父子关系、允许类型、最大深度和无环。几何与布局通过平面图布局接口保存。\n\n**English**\n\nCreate a space and its attributes, validating same-site parent-child relationships, permitted types, maximum depth and acyclicity. Save geometry and layout using the plan-layout endpoints."
      }
    },
    "/api/platform/masterdata/spaces/{spaceId}": {
      "get": {
        "operationId": "getSpace",
        "tags": [
          "masterdata"
        ],
        "summary": "查询空间编辑详情 / Read space details for editing",
        "description": "**中文**\n\n返回基础名称、完整 nameI18n、属性及由 uid 组成的路径。\n\n**English**\n\nReturn the base name, complete nameI18n dictionary, attributes and a path composed of UIDs.",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间 UID。\n\n**English**\n\nUID of the target space."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n空间详情\n\n**English**\n\nSpace details",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "parentId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                        "path": "/01a2319e-216a-753a-9629-ff08bd70dfdd/01a2319e-2167-7240-bc32-25e7efb4b1e6/",
                        "typeCode": "shelf",
                        "code": "H1",
                        "name": "一号货架",
                        "nameI18n": {},
                        "status": 1,
                        "isSiteGate": false,
                        "attrs": {
                          "shelf_kind": "gondola",
                          "elevation_count": 2,
                          "tier_count": 4
                        }
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440340"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/platform/masterdata/spaces/{spaceId}/update": {
      "post": {
        "operationId": "updateSpace",
        "tags": [
          "masterdata"
        ],
        "summary": "更新空间资料或移动子树 / Update space details or move a subtree",
        "description": "**中文**\n\n提交完整可编辑资料及 nameI18n。parentId 为空或省略时挂在 SITE 根级，校验同场所父子关系、允许类型、最大深度和无环；变更父节点时事务内更新子树路径及有关属性历史。\n\n**English**\n\nSubmit complete editable information and nameI18n. A null or omitted parentId places the space at the SITE root level. Validate same-site parent-child relationships, permitted types, maximum depth and acyclicity; changing the parent updates subtree paths and relevant attribute history within the transaction.",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间 UID。\n\n**English**\n\nUID of the target space."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSpaceRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "parentId": null,
                    "typeCode": "shelf",
                    "code": "H1",
                    "name": "一号货架（调整后）",
                    "nameI18n": {},
                    "attrs": {
                      "shelf_kind": "gondola",
                      "elevation_count": 2,
                      "tier_count": 4
                    },
                    "isSiteGate": false,
                    "sortOrder": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n更新后的空间\n\n**English**\n\nUpdated space",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "parentId": null,
                        "path": "/01a2319e-2167-7240-bc32-25e7efb4b1e6/",
                        "typeCode": "shelf",
                        "code": "H1",
                        "name": "一号货架（调整后）",
                        "nameI18n": {},
                        "status": 1,
                        "isSiteGate": false,
                        "attrs": {
                          "shelf_kind": "gondola",
                          "elevation_count": 2,
                          "tier_count": 4
                        },
                        "sortOrder": 1
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440341"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/platform/masterdata/spaces/{spaceId}/delete": {
      "post": {
        "operationId": "deleteSpace",
        "tags": [
          "masterdata"
        ],
        "summary": "逻辑删除叶子空间 / Logically delete a leaf space",
        "description": "**中文**\n\n仅允许删除无有效子空间的叶子节点，有子空间时返回 409。事务内逻辑删除以该空间为 scopeSpaceId 的楼层平面图，并关闭对应当前布局及该空间的当前布局。复用 masterdata:update_space 权限。\n\n**English**\n\nOnly leaf spaces with no active child spaces may be deleted. Existing children cause a 409 response. Within the transaction, logically delete floor plans scoped to this space via scopeSpaceId and close their current layouts and the space's current layouts. Reuse the masterdata:update_space permission.",
        "parameters": [
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间 UID。\n\n**English**\n\nUID of the target space."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n删除结果\n\n**English**\n\nDeletion result",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteSpaceEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                        "deleted": true
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440342"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/platform/masterdata/sites/{siteId}/plans": {
      "get": {
        "operationId": "listSitePlans",
        "tags": [
          "masterdata"
        ],
        "summary": "查询场所内的有效平面图 / List active plans for a site",
        "description": "**中文**\n\n返回场所总图及楼层平面图，含未标定图纸。scopeSpaceId 为空表示整场图。\n\n**English**\n\nReturn the site's overall and floor-level plans, including uncalibrated plans. A null scopeSpaceId denotes the overall site plan.",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标经营场所 UID。\n\n**English**\n\nUID of the target site."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n平面图列表\n\n**English**\n\nPlan list",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpacePlanListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "planId": "01a2319e-2167-7240-bc32-25e8deadb7c6",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "scopeSpaceId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                            "name": "一层平面图",
                            "imageWidthPx": 1600,
                            "imageHeightPx": 1200,
                            "scaleMeterPerPx": 0.02,
                            "originPoint": {
                              "x": 100,
                              "y": 100
                            },
                            "boundaryPolygon": null,
                            "versionNo": 1
                          },
                          {
                            "planId": "01a2319e-216e-74c5-ada7-30315d373551",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "scopeSpaceId": null,
                            "name": "场所总图",
                            "imageWidthPx": 1600,
                            "imageHeightPx": 1200,
                            "scaleMeterPerPx": null,
                            "originPoint": null,
                            "boundaryPolygon": null,
                            "versionNo": 1
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440345"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "operationId": "createPlan",
        "tags": [
          "masterdata"
        ],
        "summary": "上传平面图 / Upload a plan",
        "description": "**中文**\n\n在授权场所上传 PNG 或 JPEG 图片。scopeSpaceId 可指定同场所楼层；省略表示整场图。新图纸未标定，比例尺与原点均为 null。同一场所同范围仅允许一张有效图纸，冲突返回 409。\n\n**English**\n\nUpload a PNG or JPEG image for an authorized site. scopeSpaceId may specify a floor in the same site; omission denotes the overall site plan. The new plan is uncalibrated, with null scale and origin. Only one active plan is allowed per scope within a site; conflicts return 409.",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标经营场所 UID。\n\n**English**\n\nUID of the target site."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "file",
                  "name"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "**中文**\n\nPNG 或 JPEG 底图文件。\n\n**English**\n\nPNG or JPEG base image file."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scopeSpaceId": {
                    "$ref": "#/components/schemas/UidString"
                  }
                }
              },
              "encoding": {
                "file": {
                  "contentType": "image/png, image/jpeg"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n创建的平面图\n\n**English**\n\nCreated plan",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpacePlanEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "planId": "01a2319e-216e-74c5-ada7-30315d373551",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "scopeSpaceId": null,
                        "name": "场所总图",
                        "imageWidthPx": 1600,
                        "imageHeightPx": 1200,
                        "scaleMeterPerPx": null,
                        "originPoint": null,
                        "boundaryPolygon": null,
                        "versionNo": 1
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440346"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/platform/masterdata/plans/{planId}": {
      "get": {
        "operationId": "getPlan",
        "tags": [
          "masterdata"
        ],
        "summary": "查询平面图详情 / Read plan details",
        "description": "**中文**\n\n返回有效图纸的元数据和标定参数。底图通过独立图片接口读取。\n\n**English**\n\nReturn metadata and calibration parameters for an active plan. The base image can be read through the separate image endpoint.",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间图纸 UID。\n\n**English**\n\nUID of the target space plan."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n平面图详情\n\n**English**\n\nPlan details",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpacePlanEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "planId": "01a2319e-2167-7240-bc32-25e8deadb7c6",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "scopeSpaceId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                        "name": "一层平面图",
                        "imageWidthPx": 1600,
                        "imageHeightPx": 1200,
                        "scaleMeterPerPx": 0.02,
                        "originPoint": {
                          "x": 100,
                          "y": 100
                        },
                        "boundaryPolygon": null,
                        "versionNo": 1
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440347"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/platform/masterdata/plans/{planId}/image": {
      "get": {
        "operationId": "getPlanImage",
        "tags": [
          "masterdata"
        ],
        "summary": "读取平面图图片 / Read the plan image",
        "description": "**中文**\n\n校验图纸所属租户和场所范围后返回原始图片字节。\n\n**English**\n\nReturn the original image bytes after validating the plan's tenant and site scope.",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间图纸 UID。\n\n**English**\n\nUID of the target space plan."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\nPNG 或 JPEG 图片\n\n**English**\n\nPNG or JPEG image",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/platform/masterdata/plans/{planId}/update": {
      "post": {
        "operationId": "updatePlan",
        "tags": [
          "masterdata"
        ],
        "summary": "更新平面图资料与标定 / Update plan details and calibration",
        "description": "**中文**\n\n提交名称，可选更新范围、标定和边界。省略相应值且未设置清除标志时保留原值。清除范围、标定或边界须将对应 clear 标志设为 true，且不得同时提交对应值。存在有效布局时清除标定返回 409 或 422。校验楼层与图纸同场所及现有布局范围。同一场所同范围仅允许一张有效图纸，修改至已占用范围返回 409。\n\n**English**\n\nSubmit the name and optionally update the scope, calibration and boundary. Omitted values retain existing values unless the corresponding clear flag is set. To clear the scope, calibration or boundary, set its clear flag to true and omit the corresponding value. Clearing calibration with active layouts returns 409 or 422. Validate that the floor belongs to the same site as the plan and that existing layouts remain within scope. Only one active plan is allowed per scope within a site; changing to an occupied scope returns 409.",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间图纸 UID。\n\n**English**\n\nUID of the target space plan."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePlanRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "name": "一层平面图（校准后）",
                    "scopeSpaceId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                    "calibration": {
                      "scaleMeterPerPx": 0.018,
                      "originPoint": {
                        "x": 120,
                        "y": 100
                      }
                    },
                    "boundaryPolygon": [
                      {
                        "x": 0,
                        "y": 0
                      },
                      {
                        "x": 28,
                        "y": 0
                      },
                      {
                        "x": 28,
                        "y": 20
                      },
                      {
                        "x": 0,
                        "y": 20
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n更新后的平面图\n\n**English**\n\nUpdated plan",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpacePlanEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "planId": "01a2319e-2167-7240-bc32-25e8deadb7c6",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "scopeSpaceId": "01a2319e-216a-753a-9629-ff08bd70dfdd",
                        "name": "一层平面图（校准后）",
                        "imageWidthPx": 1600,
                        "imageHeightPx": 1200,
                        "scaleMeterPerPx": 0.018,
                        "originPoint": {
                          "x": 120,
                          "y": 100
                        },
                        "boundaryPolygon": [
                          {
                            "x": 0,
                            "y": 0
                          },
                          {
                            "x": 28,
                            "y": 0
                          },
                          {
                            "x": 28,
                            "y": 20
                          },
                          {
                            "x": 0,
                            "y": 20
                          }
                        ],
                        "versionNo": 2
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440348"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/platform/masterdata/plans/{planId}/replace": {
      "post": {
        "operationId": "replacePlan",
        "tags": [
          "masterdata"
        ],
        "summary": "原子替换平面图 / Atomically replace a plan",
        "description": "**中文**\n\n在同一事务内停用同范围全部有效图纸并关闭其当前布局，创建未标定的新图纸。沿用旧图纸的场所与范围，版本从 1 开始；旧图纸已失效时返回 409。复用 masterdata:update_space 权限。\n\n**English**\n\nIn one transaction, deactivate all active plans in the same scope, close their current layouts and create a new uncalibrated plan. Reuse the previous plan's site and scope and start at version 1; a previous plan that is already inactive causes a 409 response. Reuse the masterdata:update_space permission.",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间图纸 UID。\n\n**English**\n\nUID of the target space plan."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "file",
                  "name"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "**中文**\n\nPNG 或 JPEG 底图文件。\n\n**English**\n\nPNG or JPEG base image file."
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                }
              },
              "encoding": {
                "file": {
                  "contentType": "image/png, image/jpeg"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n替换后的新平面图\n\n**English**\n\nNew replacement plan",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpacePlanEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "planId": "01a2319e-216e-74c5-ada7-30315d373552",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "scopeSpaceId": null,
                        "name": "替换后的场所总图",
                        "imageWidthPx": 1600,
                        "imageHeightPx": 1200,
                        "scaleMeterPerPx": null,
                        "originPoint": null,
                        "boundaryPolygon": null,
                        "versionNo": 1
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440346"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "413": {
            "$ref": "#/components/responses/PayloadTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/platform/masterdata/plans/{planId}/delete": {
      "post": {
        "operationId": "deletePlan",
        "tags": [
          "masterdata"
        ],
        "summary": "逻辑删除平面图 / Logically delete a plan",
        "description": "**中文**\n\n逻辑删除平面图并在同一事务内关闭其全部当前生效布局。复用 masterdata:update_space 权限。\n\n**English**\n\nLogically delete the plan and close all its currently effective layouts in the same transaction. Reuse the masterdata:update_space permission.",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间图纸 UID。\n\n**English**\n\nUID of the target space plan."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n删除结果\n\n**English**\n\nDeletion result",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePlanEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "planId": "01a2319e-216e-74c5-ada7-30315d373551",
                        "deleted": true
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440349"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/platform/masterdata/plans/{planId}/layouts": {
      "get": {
        "operationId": "listPlanLayouts",
        "tags": [
          "masterdata"
        ],
        "summary": "读取当前生效布局 / Read currently effective layouts",
        "description": "**中文**\n\n返回该有效图纸当前生效的布局。每条版本的 layoutId 为该版本行的不可变 uid。\n\n**English**\n\nReturn currently effective layouts for the active plan. Each layout version's layoutId is the immutable UID of that version row.",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间图纸 UID。\n\n**English**\n\nUID of the target space plan."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n当前生效布局\n\n**English**\n\nCurrently effective layouts",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanLayoutListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "layoutId": "01a2319e-216f-7248-8cdb-134f15aa9b6e",
                            "planId": "01a2319e-2167-7240-bc32-25e8deadb7c6",
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "pose": {
                              "x": 12.5,
                              "y": 8,
                              "width": 2.4,
                              "height": 0.8,
                              "rotation": 0
                            },
                            "outlinePolygon": null,
                            "validFrom": "2026-12-01T09:00:00.100Z"
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440350"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/platform/masterdata/plans/{planId}/layouts/save": {
      "post": {
        "operationId": "savePlanLayouts",
        "tags": [
          "masterdata"
        ],
        "summary": "整批保存平面图布局 / Save the full batch of plan layouts",
        "description": "**中文**\n\n必须提交编辑时的 expectedPlanVersion 与完整 expectedLayoutIds；当前无布局时传空数组。在事务锁内比对图纸版本及当前布局 ID 集合，任一不符返回 409，不修改布局。图纸必须已标定，否则返回 422。校验图纸与所有空间的租户、场所及楼层归属，事务内关闭全部旧的当前布局并为本批每项插入新 SCD2 版本，版本行各生成独立 UUIDv7。返回更新后的当前生效布局。\n\n**English**\n\nSubmit expectedPlanVersion and the complete expectedLayoutIds from the editing baseline; use an empty array when there are no current layouts. Under a transaction lock, compare the plan version and current layout ID set. Any mismatch returns 409 without modifying layouts. The plan must be calibrated, otherwise return 422. Validate the tenant, site and floor membership of the plan and all spaces. Within the transaction, close all previous current layouts and insert a new SCD2 version for every item in the batch, generating an independent UUIDv7 for each version row. Return the updated currently effective layouts.",
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间图纸 UID。\n\n**English**\n\nUID of the target space plan."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavePlanLayoutsRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "items": [
                      {
                        "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                        "pose": {
                          "x": 12.5,
                          "y": 8,
                          "width": 2.4,
                          "height": 0.8,
                          "rotation": 90
                        },
                        "outlinePolygon": null
                      }
                    ],
                    "expectedPlanVersion": 2,
                    "expectedLayoutIds": [
                      "01a2319e-216f-74c5-ada7-30315d373553"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n更新后的当前生效布局\n\n**English**\n\nUpdated currently effective layouts",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanLayoutListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "layoutId": "01a2319e-216f-7248-8cdb-135097f75611",
                            "planId": "01a2319e-2167-7240-bc32-25e8deadb7c6",
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "pose": {
                              "x": 12.5,
                              "y": 8,
                              "width": 2.4,
                              "height": 0.8,
                              "rotation": 90
                            },
                            "outlinePolygon": null,
                            "validFrom": "2026-12-01T09:00:00.200Z"
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440351"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/platform/masterdata/spaces/{spaceId}/slots": {
      "get": {
        "operationId": "listSpaceSlots",
        "tags": [
          "masterdata"
        ],
        "summary": "查询空间内的槽位 / List slots within a space",
        "description": "**中文**\n\n条目以 parentSlotId 和 path 表达层级。可按槽位类型筛选。\n\n**English**\n\nItems represent the hierarchy using parentSlotId and path. The list can be filtered by slot type.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          },
          {
            "name": "spaceId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间 ID。\n\n**English**\n\nID of the target space."
          },
          {
            "name": "slotType",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SlotType"
            },
            "description": "**中文**\n\n按槽位类型筛选。\n\n**English**\n\nFilter by space slot type."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n空间槽位列表\n\n**English**\n\nList of space slots",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlotListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "slotId": "01a2319e-2167-7240-bc32-25e9b2c35258",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "parentSlotId": null,
                            "path": "/01a2319e-2167-7240-bc32-25e9b2c35258/",
                            "slotType": "ELEVATION",
                            "slotCode": "H1-A",
                            "name": "A面",
                            "sortOrder": 0,
                            "status": 1
                          },
                          {
                            "slotId": "01a2319e-216c-7098-ae10-454e1350e636",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "parentSlotId": "01a2319e-2167-7240-bc32-25e9b2c35258",
                            "path": "/01a2319e-2167-7240-bc32-25e9b2c35258/01a2319e-216c-7098-ae10-454e1350e636/",
                            "slotType": "TIER",
                            "slotCode": "H1-A-1",
                            "name": "A面第一层",
                            "sortOrder": 0,
                            "status": 1
                          },
                          {
                            "slotId": "01a2319e-216a-753a-9629-ff0549457a81",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "spaceId": "01a2319e-2167-7240-bc32-25e7efb4b1e6",
                            "parentSlotId": "01a2319e-216c-7098-ae10-454e1350e636",
                            "path": "/01a2319e-2167-7240-bc32-25e9b2c35258/01a2319e-216c-7098-ae10-454e1350e636/01a2319e-216a-753a-9629-ff0549457a81/",
                            "slotType": "CELL",
                            "slotCode": "H1-A-1-1",
                            "name": "一号格",
                            "sortOrder": 0,
                            "status": 1
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440335"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/platform/masterdata/slots/{slotId}/products": {
      "get": {
        "operationId": "listSlotProducts",
        "tags": [
          "masterdata"
        ],
        "summary": "查询槽位的计划陈列商品 / List products scheduled for display in a slot",
        "parameters": [
          {
            "name": "slotId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间槽位 ID。\n\n**English**\n\nID of the target space slot."
          },
          {
            "name": "at",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n查询该时刻生效的绑定。省略时使用当前时间。\n\n**English**\n\nQuery bindings effective at this instant. If omitted, use the current time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n在指定时刻生效的绑定\n\n**English**\n\nBindings effective at the specified instant",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlotProductBindingListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "bindingId": "9102",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                            "slotId": "01a2319e-216a-753a-9629-ff0549457a81",
                            "productId": "01a2319e-216a-753a-9629-ff0428d4c0b4",
                            "expectedFacings": 2,
                            "validFrom": "2026-11-17T14:00:00Z",
                            "validTo": null
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440336"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        },
        "description": "**中文**\n\n返回指定时刻生效的商品绑定，须满足 validFrom 不晚于查询时刻且 validTo 为空或晚于该时刻。\n\n**English**\n\nReturn product bindings effective at the specified instant, with validFrom at or before that instant and validTo either null or later than that instant."
      },
      "post": {
        "operationId": "bindSlotProduct",
        "tags": [
          "masterdata"
        ],
        "summary": "绑定或更换槽位的计划陈列商品 / Bind or replace a product scheduled for display in a slot",
        "description": "**中文**\n\n按生效时间维护商品绑定的左闭右开区间。在同一事务内结束被替换的绑定并写入新记录。\n\n**English**\n\nMaintain product binding validity as left-closed, right-open intervals according to the effective time. End the replaced binding and write the new record within the same transaction.",
        "parameters": [
          {
            "name": "slotId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间槽位 ID。\n\n**English**\n\nID of the target space slot."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BindSlotProductRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                    "productId": "01a2319e-216a-753a-9629-ff0428d4c0b4",
                    "expectedFacings": 2,
                    "effectiveAt": "2026-11-17T14:00:00Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n绑定结果\n\n**English**\n\nBinding result",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlotProductBindingEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "bindingId": "9102",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "slotId": "01a2319e-216a-753a-9629-ff0549457a81",
                        "productId": "01a2319e-216a-753a-9629-ff0428d4c0b4",
                        "expectedFacings": 2,
                        "validFrom": "2026-11-17T14:00:00Z",
                        "validTo": null
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440308"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/platform/masterdata/slots/{slotId}/products/{bindingId}/unbind": {
      "post": {
        "operationId": "unbindSlotProduct",
        "tags": [
          "masterdata"
        ],
        "summary": "结束槽位商品绑定 / End a slot product binding",
        "description": "**中文**\n\n将绑定的 validTo 设为 effectiveAt 并保留历史。生效时间须晚于 validFrom。对已结束的绑定重复提交同一时间时，返回该绑定。\n\n**English**\n\nSet validTo of the binding to effectiveAt and retain the history. The effective time must be later than validFrom. Repeating the end request with the same time for an already-ended binding returns that binding.",
        "parameters": [
          {
            "name": "slotId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n目标空间槽位 ID。\n\n**English**\n\nID of the target space slot."
          },
          {
            "name": "bindingId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/IdString"
            },
            "description": "**中文**\n\n待结束的槽位商品绑定 ID。\n\n**English**\n\nID of the slot product binding to end."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnbindSlotProductRequest"
              },
              "examples": {
                "request": {
                  "value": {
                    "effectiveAt": "2026-11-18T14:00:00Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "**中文**\n\n结束后的绑定\n\n**English**\n\nBinding after ending it",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlotProductBindingEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "bindingId": "9102",
                        "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                        "siteId": "01a2319e-2165-70ab-b75b-6059601deb62",
                        "slotId": "01a2319e-216a-753a-9629-ff0549457a81",
                        "productId": "01a2319e-216a-753a-9629-ff0428d4c0b4",
                        "expectedFacings": 2,
                        "validFrom": "2026-11-17T14:00:00Z",
                        "validTo": "2026-11-18T14:00:00Z"
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440337"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/platform/masterdata/products": {
      "get": {
        "operationId": "listProducts",
        "tags": [
          "masterdata"
        ],
        "summary": "分页查询当前租户商品 / List products in the current tenant by page",
        "parameters": [
          {
            "name": "skuCode",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n按 SKU 编码精确筛选。\n\n**English**\n\nFilter by exact SKU code.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "barcode",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n按条码精确筛选。\n\n**English**\n\nFilter by exact barcode.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 20
            },
            "description": "**中文**\n\n本页最多返回的记录条数。\n\n**English**\n\nMaximum number of records returned in this page."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "**中文**\n\n本页之前跳过的记录条数。\n\n**English**\n\nNumber of records skipped before this page."
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n分页商品列表\n\n**English**\n\nPaginated list of products",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductPageEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "productId": "01a2319e-216a-753a-9629-ff0428d4c0b4",
                            "tenantId": "01a2319e-215e-74f1-b5e0-b9650e2a3f98",
                            "skuCode": "SKU-7002",
                            "name": "示例薯片",
                            "status": 1
                          }
                        ],
                        "page": {
                          "limit": 20,
                          "offset": 0,
                          "hasMore": false,
                          "total": 1
                        }
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440338"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "description": "**中文**\n\n分页查询当前租户的商品主数据，可按 SKU 编码或条码进行精确筛选。\n\n**English**\n\nRead a page of product master data in the current tenant, optionally filtering by exact SKU code or barcode."
      }
    },
    "/api/platform/masterdata/regions": {
      "get": {
        "operationId": "listRegions",
        "tags": [
          "masterdata"
        ],
        "summary": "查询行政区划 / List administrative regions",
        "description": "**中文**\n\n返回启用的行政区划。提供父级 ID 时返回其直接下级，省略时返回顶级区划。\n\n**English**\n\nReturn enabled administrative regions. If a parent ID is provided, return its direct children. If omitted, return top-level regions.",
        "parameters": [
          {
            "$ref": "#/components/parameters/AcceptLanguage"
          },
          {
            "name": "parentId",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n父级行政区划 ID。\n\n**English**\n\nParent administrative region ID.",
            "schema": {
              "$ref": "#/components/schemas/IdString"
            }
          },
          {
            "name": "countryCode",
            "in": "query",
            "required": false,
            "description": "**中文**\n\n按国家或地区编码筛选。\n\n**English**\n\nFilter by country or territory code.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "**中文**\n\n行政区划列表\n\n**English**\n\nList of administrative regions",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionListEnvelope"
                },
                "examples": {
                  "success": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "regionId": "310000",
                            "parentId": "100000",
                            "regionCode": "310000",
                            "name": "上海市",
                            "level": 1,
                            "countryCode": "CN",
                            "sortOrder": 0
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440339"
                    }
                  },
                  "root": {
                    "value": {
                      "code": 0,
                      "data": {
                        "items": [
                          {
                            "regionId": "100000",
                            "parentId": null,
                            "regionCode": "CN",
                            "name": "中国",
                            "level": 0,
                            "countryCode": "CN",
                            "sortOrder": 0
                          }
                        ]
                      },
                      "message": "ok",
                      "requestId": "550e8400-e29b-41d4-a716-446655440344"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "**中文**\n\nKeycloak 签发的 OpenID Connect 访问令牌（Bearer JWT）。\n\n**English**\n\nOpenID Connect access token issued by Keycloak (Bearer JWT)."
      }
    },
    "schemas": {
      "OrgUnitType": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "typeCode",
          "name",
          "isBuiltin",
          "sortOrder"
        ],
        "properties": {
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n组织单元类型的业务编码。\n\n**English**\n\nBusiness code of the org unit type."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n按请求语言解析后的显示名。\n\n**English**\n\nDisplay name resolved according to the requested language."
          },
          "isBuiltin": {
            "type": "boolean",
            "description": "**中文**\n\n是否为平台预置类型。\n\n**English**\n\nWhether the type is built in by the platform."
          },
          "sortOrder": {
            "type": "integer",
            "description": "**中文**\n\n类型选项的排序号，按升序排列。\n\n**English**\n\nOrdering value of the type option, sorted ascending."
          }
        }
      },
      "OrgUnitTypeListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgUnitType"
            },
            "description": "**中文**\n\n当前租户有效的组织单元类型选项列表。\n\n**English**\n\nList of effective org unit type options for the current tenant."
          }
        }
      },
      "OrgUnitTypeListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/OrgUnitTypeListData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "OrgUnit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "orgUnitId",
          "tenantId",
          "name",
          "typeCode",
          "sortOrder",
          "status"
        ],
        "properties": {
          "orgUnitId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父组织单元 ID，根节点为 null。\n\n**English**\n\nParent org unit ID, or null for a root node."
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n组织单元的可选业务编码。\n\n**English**\n\nOptional business code of the org unit."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n按请求语言解析后的显示名。\n\n**English**\n\nDisplay name resolved according to the requested language."
          },
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n组织单元类型编码，由当前租户生效的组织单元类型字典定义。\n\n**English**\n\nOrg unit type code, defined by the effective org unit type dictionary of the current tenant."
          },
          "sortOrder": {
            "type": "integer",
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          },
          "status": {
            "type": "integer",
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          }
        }
      },
      "OrgUnitDetail": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "orgUnitId",
          "tenantId",
          "name",
          "nameI18n",
          "typeCode",
          "sortOrder",
          "status"
        ],
        "properties": {
          "orgUnitId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父组织单元 ID，根节点为 null。\n\n**English**\n\nParent org unit ID, or null for a root node."
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n组织单元的可选业务编码。\n\n**English**\n\nOptional business code of the org unit."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n组织单元类型编码，由当前租户生效的组织单元类型字典定义。\n\n**English**\n\nOrg unit type code, defined by the effective org unit type dictionary of the current tenant."
          },
          "sortOrder": {
            "type": "integer",
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          },
          "status": {
            "type": "integer",
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          }
        }
      },
      "SaveOrgUnitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "typeCode"
        ],
        "properties": {
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父组织单元 ID，为 null 或省略时表示根节点。\n\n**English**\n\nParent org unit ID. null or omission represents a root node."
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n组织单元的可选业务编码。\n\n**English**\n\nOptional business code of the org unit."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n组织单元类型编码，由当前租户生效的组织单元类型字典定义。\n\n**English**\n\nOrg unit type code, defined by the effective org unit type dictionary of the current tenant."
          },
          "sortOrder": {
            "type": "integer",
            "default": 0,
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          }
        }
      },
      "UpdateOrgUnitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "nameI18n",
          "typeCode"
        ],
        "properties": {
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父组织单元 ID，为 null 或省略时表示根节点。\n\n**English**\n\nParent org unit ID. null or omission represents a root node."
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n组织单元的可选业务编码。\n\n**English**\n\nOptional business code of the org unit."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n组织单元类型编码，由当前租户生效的组织单元类型字典定义。\n\n**English**\n\nOrg unit type code, defined by the effective org unit type dictionary of the current tenant."
          },
          "sortOrder": {
            "type": "integer",
            "default": 0,
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          }
        }
      },
      "OrgUnitListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrgUnit"
            },
            "description": "**中文**\n\n当前租户的组织单元列表。\n\n**English**\n\nList of org units within the current tenant."
          }
        }
      },
      "OrgUnitListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/OrgUnitListData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "OrgUnitEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/OrgUnitDetail"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "Site": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "siteId",
          "tenantId",
          "siteCode",
          "name",
          "siteType",
          "timezone",
          "operatingStatus"
        ],
        "properties": {
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "orgUnitId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n经营场所所属的组织单元 ID，直属租户时为 null。\n\n**English**\n\nOwning org unit ID of the site, or null if the site belongs directly to the tenant."
          },
          "siteCode": {
            "type": "string",
            "description": "**中文**\n\n租户内的场所业务编码。\n\n**English**\n\nBusiness code of the site within the tenant."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n按请求语言解析后的显示名。\n\n**English**\n\nDisplay name resolved according to the requested language."
          },
          "siteType": {
            "type": "string",
            "enum": [
              "STORE",
              "MALL",
              "MUSEUM",
              "AIRPORT"
            ],
            "description": "**中文**\n\n经营场所类型：STORE 门店、MALL 商场、MUSEUM 博物馆、AIRPORT 机场。\n\n**English**\n\nSite type: STORE for store, MALL for shopping mall, MUSEUM for museum, and AIRPORT for airport."
          },
          "timezone": {
            "type": "string",
            "description": "**中文**\n\n经营场所的 IANA 时区。\n\n**English**\n\nIANA time zone of the site."
          },
          "provinceId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的省级行政区划 ID。\n\n**English**\n\nID of the province-level administrative region of the site."
          },
          "cityId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的城市行政区划 ID。\n\n**English**\n\nID of the city-level administrative region of the site."
          },
          "districtId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的区县级行政区划 ID。\n\n**English**\n\nID of the district- or county-level administrative region of the site."
          },
          "address": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所的详细地址。\n\n**English**\n\nDetailed address of the site."
          },
          "operatingStatus": {
            "$ref": "#/components/schemas/OperatingStatus"
          },
          "weeklyBusinessHours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeeklyBusinessDay"
            },
            "minItems": 7,
            "maxItems": 7,
            "description": "**中文**\n\n完整周常规规则，星期 1 至 7 各出现一次，按星期升序。规则按生效区间保存。\n\n**English**\n\nComplete regular weekly rules, with weekdays 1 through 7 each appearing once in ascending order. Rules are stored with validity periods."
          },
          "metricConfig": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "**中文**\n\n场所设置的指标口径配置。\n\n**English**\n\nMetric definition configuration for the site."
          }
        }
      },
      "SiteDetail": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "siteId",
          "tenantId",
          "siteCode",
          "name",
          "nameI18n",
          "siteType",
          "timezone",
          "operatingStatus",
          "weeklyBusinessHours",
          "metricConfig"
        ],
        "properties": {
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "orgUnitId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n经营场所所属的组织单元 ID，直属租户时为 null。\n\n**English**\n\nOwning org unit ID of the site, or null if the site belongs directly to the tenant."
          },
          "siteCode": {
            "type": "string",
            "description": "**中文**\n\n租户内的场所业务编码。\n\n**English**\n\nBusiness code of the site within the tenant."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "siteType": {
            "type": "string",
            "enum": [
              "STORE",
              "MALL",
              "MUSEUM",
              "AIRPORT"
            ],
            "description": "**中文**\n\n经营场所类型：STORE 门店、MALL 商场、MUSEUM 博物馆、AIRPORT 机场。\n\n**English**\n\nSite type: STORE for store, MALL for shopping mall, MUSEUM for museum, and AIRPORT for airport."
          },
          "timezone": {
            "type": "string",
            "description": "**中文**\n\n经营场所的 IANA 时区。\n\n**English**\n\nIANA time zone of the site."
          },
          "provinceId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的省级行政区划 ID。\n\n**English**\n\nID of the province-level administrative region of the site."
          },
          "cityId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的城市行政区划 ID。\n\n**English**\n\nID of the city-level administrative region of the site."
          },
          "districtId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的区县级行政区划 ID。\n\n**English**\n\nID of the district- or county-level administrative region of the site."
          },
          "address": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所的详细地址。\n\n**English**\n\nDetailed address of the site."
          },
          "operatingStatus": {
            "$ref": "#/components/schemas/OperatingStatus"
          },
          "weeklyBusinessHours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeeklyBusinessDay"
            },
            "minItems": 7,
            "maxItems": 7,
            "description": "**中文**\n\n完整周常规规则，星期 1 至 7 各出现一次，按星期升序。规则按生效区间保存。\n\n**English**\n\nComplete regular weekly rules, with weekdays 1 through 7 each appearing once in ascending order. Rules are stored with validity periods."
          },
          "metricConfig": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "**中文**\n\n场所设置的指标口径配置。\n\n**English**\n\nMetric definition configuration for the site."
          },
          "countryCode": {
            "type": "string",
            "nullable": true,
            "maxLength": 16
          },
          "longitude": {
            "type": "number",
            "nullable": true,
            "minimum": -180,
            "maximum": 180
          },
          "latitude": {
            "type": "number",
            "nullable": true,
            "minimum": -90,
            "maximum": 90
          },
          "areaM2": {
            "type": "number",
            "nullable": true,
            "minimum": 0
          },
          "openDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "SaveSiteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "siteType",
          "timezone",
          "weeklyBusinessHours"
        ],
        "properties": {
          "orgUnitId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n经营场所所属的组织单元 ID，直属租户时为 null。\n\n**English**\n\nOwning org unit ID of the site, or null if the site belongs directly to the tenant."
          },
          "siteCode": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 64,
            "description": "**中文**\n\n客户外部场所编码，省略或为 null 时表示无编码。\n\n**English**\n\nCustomer's external site code; omission or null indicates no code."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "siteType": {
            "type": "string",
            "enum": [
              "STORE",
              "MALL",
              "MUSEUM",
              "AIRPORT"
            ],
            "description": "**中文**\n\n经营场所类型：STORE 门店、MALL 商场、MUSEUM 博物馆、AIRPORT 机场。\n\n**English**\n\nSite type: STORE for store, MALL for shopping mall, MUSEUM for museum, and AIRPORT for airport."
          },
          "timezone": {
            "type": "string",
            "description": "**中文**\n\n经营场所的 IANA 时区。\n\n**English**\n\nIANA time zone of the site."
          },
          "provinceId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的省级行政区划 ID。\n\n**English**\n\nID of the province-level administrative region of the site."
          },
          "cityId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的城市行政区划 ID。\n\n**English**\n\nID of the city-level administrative region of the site."
          },
          "districtId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所所在的区县级行政区划 ID。\n\n**English**\n\nID of the district- or county-level administrative region of the site."
          },
          "address": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n场所的详细地址。\n\n**English**\n\nDetailed address of the site."
          },
          "weeklyBusinessHours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeeklyBusinessDay"
            },
            "minItems": 7,
            "maxItems": 7,
            "description": "**中文**\n\n完整周常规规则，星期 1 至 7 各出现一次，按星期升序。规则按生效区间保存。\n\n**English**\n\nComplete regular weekly rules, with weekdays 1 through 7 each appearing once in ascending order. Rules are stored with validity periods."
          },
          "metricConfig": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "**中文**\n\n场所级统计口径配置，包括按场所定义的统计参数。\n\n**English**\n\nSite-level metric definition configuration, including site-specific statistical parameters."
          },
          "operatingStatus": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OperatingStatus"
              }
            ],
            "default": "OPERATING"
          },
          "countryCode": {
            "type": "string",
            "nullable": true,
            "maxLength": 16
          },
          "longitude": {
            "type": "number",
            "nullable": true,
            "minimum": -180,
            "maximum": 180
          },
          "latitude": {
            "type": "number",
            "nullable": true,
            "minimum": -90,
            "maximum": 90
          },
          "areaM2": {
            "type": "number",
            "nullable": true,
            "minimum": 0
          },
          "openDate": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "UpdateSiteRequest": {
        "type": "object",
        "additionalProperties": false,
        "description": "**中文**\n\n提交必填资料及完整 nameI18n。可选场所资料、weeklyBusinessHours 和 metricConfig 省略时保留库中现有值，提供对应值时替换。声明可空的字段传 null 时也保留现有值。orgUnitId 为空或省略时表示直属租户。\n\n**English**\n\nSubmit required information and the complete nameI18n dictionary. Optional site data, weeklyBusinessHours and metricConfig retain their stored values when omitted; provided values replace them. null also retains existing values for fields declared nullable. A null or omitted orgUnitId denotes a tenant-direct site.",
        "required": [
          "name",
          "nameI18n",
          "siteType",
          "timezone",
          "operatingStatus"
        ],
        "properties": {
          "orgUnitId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n经营场所所属的组织单元 ID，直属租户时为 null。\n\n**English**\n\nOwning org unit ID of the site, or null if the site belongs directly to the tenant."
          },
          "siteCode": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "maxLength": 64,
            "description": "**中文**\n\n客户外部场所编码，省略或为 null 时保留现有编码，提供非空值时更新。\n\n**English**\n\nCustomer's external site code. Omission or null retains the existing code; providing a nonempty value updates it."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "siteType": {
            "type": "string",
            "enum": [
              "STORE",
              "MALL",
              "MUSEUM",
              "AIRPORT"
            ],
            "description": "**中文**\n\n经营场所类型：STORE 门店、MALL 商场、MUSEUM 博物馆、AIRPORT 机场。\n\n**English**\n\nSite type: STORE for store, MALL for shopping mall, MUSEUM for museum, and AIRPORT for airport."
          },
          "timezone": {
            "type": "string",
            "description": "**中文**\n\n经营场所的 IANA 时区。\n\n**English**\n\nIANA time zone of the site."
          },
          "provinceId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n省略或为 null 时保留现有省级区划，提供值时替换。\n\n**English**\n\nOmission or null retains the existing province-level region; supplying a value replaces it."
          },
          "cityId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n省略或为 null 时保留现有市级区划，提供值时替换。\n\n**English**\n\nOmission or null retains the existing city-level region; supplying a value replaces it."
          },
          "districtId": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n省略或为 null 时保留现有区县区划，提供值时替换。\n\n**English**\n\nOmission or null retains the existing district- or county-level region; supplying a value replaces it."
          },
          "address": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n省略或为 null 时保留现有地址，提供值时替换。\n\n**English**\n\nOmission or null retains the existing address; supplying a value replaces it."
          },
          "weeklyBusinessHours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WeeklyBusinessDay"
            },
            "minItems": 7,
            "maxItems": 7,
            "description": "**中文**\n\n省略时保留现有周常规规则；提供时整周替换，星期 1 至 7 各出现一次，按星期升序。规则按生效区间保存。\n\n**English**\n\nOmission retains the existing regular weekly rules; supplying rules replaces the complete week, with weekdays 1 through 7 each appearing once in ascending order. Rules are stored with validity periods."
          },
          "metricConfig": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "**中文**\n\n省略或为 null 时保留现有指标口径配置，提供对象时替换。\n\n**English**\n\nOmission or null retains the existing metric configuration; supplying an object replaces it."
          },
          "operatingStatus": {
            "$ref": "#/components/schemas/OperatingStatus"
          },
          "countryCode": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "**中文**\n\n省略或为 null 时保留现有国家编码，提供值时替换。\n\n**English**\n\nOmission or null retains the existing country code; supplying a value replaces it."
          },
          "longitude": {
            "type": "number",
            "nullable": true,
            "minimum": -180,
            "maximum": 180,
            "description": "**中文**\n\n省略或为 null 时保留现有经度，提供值时替换。\n\n**English**\n\nOmission or null retains the existing longitude; supplying a value replaces it."
          },
          "latitude": {
            "type": "number",
            "nullable": true,
            "minimum": -90,
            "maximum": 90,
            "description": "**中文**\n\n省略或为 null 时保留现有纬度，提供值时替换。\n\n**English**\n\nOmission or null retains the existing latitude; supplying a value replaces it."
          },
          "areaM2": {
            "type": "number",
            "nullable": true,
            "minimum": 0,
            "description": "**中文**\n\n省略或为 null 时保留现有面积，提供值时替换。\n\n**English**\n\nOmission or null retains the existing area; supplying a value replaces it."
          },
          "openDate": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "**中文**\n\n省略或为 null 时保留现有开业日期，提供值时替换。\n\n**English**\n\nOmission or null retains the existing opening date; supplying a value replaces it."
          }
        }
      },
      "SitePageData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Site"
            },
            "description": "**中文**\n\n满足查询条件和授权范围的本页场所记录。\n\n**English**\n\nSite records in this page matching the query and authorized scope."
          },
          "page": {
            "$ref": "#/components/schemas/PageMeta"
          }
        }
      },
      "SitePageEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SitePageData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "SiteEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SiteDetail"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "CreateSpaceRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "typeCode",
          "name"
        ],
        "properties": {
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父空间 ID，直属场所的根空间为 null。\n\n**English**\n\nParent space ID, or null for a root space directly under the site."
          },
          "typeCode": {
            "type": "string",
            "description": "**中文**\n\n空间类型的业务编码。\n\n**English**\n\nBusiness code of the space type."
          },
          "isSiteGate": {
            "type": "boolean",
            "default": false,
            "description": "**中文**\n\n仅场所外围出入口使用 true，此时 typeCode 为 portal。\n\n**English**\n\nUse true only for a site perimeter entrance or exit, in which case typeCode is portal."
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n空间的可选业务编码。\n\n**English**\n\nOptional business code of the space."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "attrs": {
            "type": "object",
            "additionalProperties": true,
            "description": "**中文**\n\n由空间类型定义的专属属性对象。\n\n**English**\n\nAttribute object specific to the space type."
          },
          "sortOrder": {
            "type": "integer",
            "default": 0
          }
        }
      },
      "Space": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "spaceId",
          "tenantId",
          "siteId",
          "path",
          "typeCode",
          "isSiteGate",
          "name",
          "status"
        ],
        "properties": {
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父空间 ID，直属场所的根空间为 null。\n\n**English**\n\nParent space ID, or null for a root space directly under the site."
          },
          "path": {
            "type": "string",
            "description": "**中文**\n\n由外部 uid 组成的物化路径，以斜杠分隔，首尾均为斜杠。\n\n**English**\n\nMaterialized path composed of external UIDs, separated by slashes and beginning and ending with a slash."
          },
          "typeCode": {
            "type": "string",
            "description": "**中文**\n\n空间类型的业务编码。\n\n**English**\n\nBusiness code of the space type."
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n空间的可选业务编码。\n\n**English**\n\nOptional business code of the space."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n按请求语言解析后的显示名。\n\n**English**\n\nDisplay name resolved according to the requested language."
          },
          "status": {
            "type": "integer",
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          },
          "isSiteGate": {
            "type": "boolean",
            "description": "**中文**\n\n是否为场所外围出入口。只有 portal 类型的外门为 true。\n\n**English**\n\nWhether this space is a site perimeter entrance or exit. Only exterior doors of type portal have a true value."
          },
          "sortOrder": {
            "type": "integer",
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          },
          "attrs": {
            "type": "object",
            "additionalProperties": true,
            "description": "**中文**\n\n空间类型专属属性。\n\n**English**\n\nAttributes specific to the space type."
          }
        }
      },
      "SpaceDetail": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "spaceId",
          "tenantId",
          "siteId",
          "path",
          "typeCode",
          "isSiteGate",
          "name",
          "nameI18n",
          "status",
          "attrs"
        ],
        "properties": {
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父空间 ID，直属场所的根空间为 null。\n\n**English**\n\nParent space ID, or null for a root space directly under the site."
          },
          "path": {
            "type": "string",
            "description": "**中文**\n\n由外部 uid 组成的物化路径，以斜杠分隔，首尾均为斜杠。\n\n**English**\n\nMaterialized path composed of external UIDs, separated by slashes and beginning and ending with a slash."
          },
          "typeCode": {
            "type": "string",
            "description": "**中文**\n\n空间类型的业务编码。\n\n**English**\n\nBusiness code of the space type."
          },
          "code": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n空间的可选业务编码。\n\n**English**\n\nOptional business code of the space."
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "status": {
            "type": "integer",
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          },
          "isSiteGate": {
            "type": "boolean",
            "description": "**中文**\n\n是否为场所外围出入口。只有 portal 类型的外门为 true。\n\n**English**\n\nWhether this space is a site perimeter entrance or exit. Only exterior doors of type portal have a true value."
          },
          "sortOrder": {
            "type": "integer",
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          },
          "attrs": {
            "type": "object",
            "additionalProperties": true,
            "description": "**中文**\n\n空间类型专属属性。\n\n**English**\n\nAttributes specific to the space type."
          }
        }
      },
      "SpaceEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SpaceDetail"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "BindSlotProductRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "siteId",
          "productId",
          "effectiveAt"
        ],
        "properties": {
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "productId": {
            "$ref": "#/components/schemas/UidString"
          },
          "expectedFacings": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "**中文**\n\n计划陈列的商品排面数量。\n\n**English**\n\nPlanned number of product facings."
          },
          "effectiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "**中文**\n\n商品绑定开始生效的时刻。\n\n**English**\n\nInstant when the product binding takes effect."
          }
        }
      },
      "SlotProductBinding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "bindingId",
          "tenantId",
          "siteId",
          "slotId",
          "productId",
          "expectedFacings",
          "validFrom"
        ],
        "properties": {
          "bindingId": {
            "$ref": "#/components/schemas/IdString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "slotId": {
            "$ref": "#/components/schemas/UidString"
          },
          "productId": {
            "$ref": "#/components/schemas/UidString"
          },
          "expectedFacings": {
            "type": "integer",
            "description": "**中文**\n\n计划陈列的商品排面数量。\n\n**English**\n\nPlanned number of product facings."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "**中文**\n\n商品绑定开始生效的时刻，包含该时刻。\n\n**English**\n\nInclusive start instant of the product binding's validity."
          },
          "validTo": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "**中文**\n\n商品绑定的失效时刻，不包含该时刻。null 表示开放的有效区间。\n\n**English**\n\nExclusive end instant of the product binding's validity. null represents an open-ended interval."
          }
        }
      },
      "SlotProductBindingEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SlotProductBinding"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "Tenant": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tenantId",
          "tenantCode",
          "name",
          "status",
          "firstDayOfWeek"
        ],
        "properties": {
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n租户的稳定业务编码，创建后不可修改。\n\n**English**\n\nStable business code of the tenant, immutable after creation."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n按请求语言解析后的显示名。\n\n**English**\n\nDisplay name resolved according to the requested language."
          },
          "defaultTimezone": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n租户默认 IANA 时区。\n\n**English**\n\nDefault IANA time zone of the tenant."
          },
          "firstDayOfWeek": {
            "type": "integer",
            "minimum": 1,
            "maximum": 7,
            "description": "**中文**\n\n周统计起始日，1 至 7 依次代表周一至周日。\n\n**English**\n\nFirst day of the reporting week, with values 1 through 7 representing Monday through Sunday."
          },
          "expireDate": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "**中文**\n\n租户有效期截止的当地日期，按租户默认时区计算且包含当日。null 表示未设置截止日期。\n\n**English**\n\nLast local date of tenant validity, inclusive in the tenant's default time zone. null means no expiration date is configured."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "ACTIVE",
              "DISABLED"
            ],
            "description": "**中文**\n\n租户生命周期状态：PENDING 为待开通，ACTIVE 为启用，DISABLED 为停用。\n\n**English**\n\nTenant lifecycle status. PENDING means pending provisioning, ACTIVE means enabled, and DISABLED means disabled."
          }
        }
      },
      "TenantDetail": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tenantId",
          "tenantCode",
          "name",
          "nameI18n",
          "status",
          "firstDayOfWeek"
        ],
        "properties": {
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n租户的稳定业务编码，创建后不可修改。\n\n**English**\n\nStable business code of the tenant, immutable after creation."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "defaultTimezone": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n租户默认 IANA 时区。\n\n**English**\n\nDefault IANA time zone of the tenant."
          },
          "firstDayOfWeek": {
            "type": "integer",
            "minimum": 1,
            "maximum": 7,
            "description": "**中文**\n\n周统计起始日，1 至 7 依次代表周一至周日。\n\n**English**\n\nFirst day of the reporting week, with values 1 through 7 representing Monday through Sunday."
          },
          "expireDate": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "**中文**\n\n租户有效期截止的当地日期，按租户默认时区计算且包含当日。null 表示未设置截止日期。\n\n**English**\n\nLast local date of tenant validity, inclusive in the tenant's default time zone. null means no expiration date is configured."
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "ACTIVE",
              "DISABLED"
            ],
            "description": "**中文**\n\n租户生命周期状态：PENDING 为待开通，ACTIVE 为启用，DISABLED 为停用。\n\n**English**\n\nTenant lifecycle status. PENDING means pending provisioning, ACTIVE means enabled, and DISABLED means disabled."
          }
        }
      },
      "TenantEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/TenantDetail"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "TenantListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tenant"
            },
            "description": "**中文**\n\n调用方可见的租户主档列表。\n\n**English**\n\nList of tenant master records visible to the caller."
          }
        }
      },
      "TenantListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/TenantListData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "SpaceListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Space"
            },
            "description": "**中文**\n\n场所内符合查询条件的空间列表。\n\n**English**\n\nList of spaces within the site matching the query."
          }
        }
      },
      "SpaceListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SpaceListData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "SlotType": {
        "type": "string",
        "enum": [
          "ELEVATION",
          "TIER",
          "CELL",
          "BAY",
          "STATION",
          "SCREEN"
        ],
        "description": "**中文**\n\n空间槽位类型：ELEVATION 立面、TIER 层、CELL 格位、BAY 节、STATION 工位、SCREEN 互动屏。\n\n**English**\n\nSpace slot type: ELEVATION for elevation, TIER for tier, CELL for cell, BAY for bay, STATION for station, and SCREEN for interactive screen."
      },
      "Slot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "slotId",
          "tenantId",
          "siteId",
          "spaceId",
          "path",
          "slotType",
          "slotCode",
          "sortOrder",
          "status"
        ],
        "properties": {
          "slotId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "parentSlotId": {
            "$ref": "#/components/schemas/NullableUidString",
            "description": "**中文**\n\n父槽位 ID，根槽位为 null。\n\n**English**\n\nParent slot ID, or null for a root slot."
          },
          "path": {
            "type": "string",
            "description": "**中文**\n\n由外部 uid 组成的物化路径，以斜杠分隔，首尾均为斜杠。\n\n**English**\n\nMaterialized path composed of external UIDs, separated by slashes and beginning and ending with a slash."
          },
          "slotType": {
            "$ref": "#/components/schemas/SlotType"
          },
          "slotCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n空间内槽位的业务编码。\n\n**English**\n\nBusiness code of the slot within the space."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n槽位的显示名称，按请求语言解析。\n\n**English**\n\nSlot display name resolved for the requested language."
          },
          "sortOrder": {
            "type": "integer",
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          },
          "status": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          }
        }
      },
      "SlotListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Slot"
            },
            "description": "**中文**\n\n空间内符合查询条件的槽位列表。\n\n**English**\n\nList of slots within the space matching the query."
          }
        }
      },
      "SlotListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SlotListData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "SlotProductBindingListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SlotProductBinding"
            },
            "description": "**中文**\n\n在指定时刻有效的槽位商品绑定列表。\n\n**English**\n\nList of slot product bindings effective at the specified instant."
          }
        }
      },
      "SlotProductBindingListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/SlotProductBindingListData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "UnbindSlotProductRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "effectiveAt"
        ],
        "properties": {
          "effectiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "**中文**\n\n结束商品绑定的生效时刻，必须晚于 validFrom。\n\n**English**\n\nEffective instant for ending the product binding, which must be later than validFrom."
          }
        }
      },
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "productId",
          "tenantId",
          "skuCode",
          "name",
          "status"
        ],
        "properties": {
          "productId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "skuCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n商品 SKU 业务编码。\n\n**English**\n\nProduct SKU business code."
          },
          "barcode": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n商品条码。\n\n**English**\n\nProduct barcode."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n商品的基础名称。\n\n**English**\n\nBase name of the product."
          },
          "categoryCode": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n商品品类编码。\n\n**English**\n\nProduct category code."
          },
          "categoryName": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n商品品类名称。\n\n**English**\n\nProduct category name."
          },
          "imageUrl": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n商品图片的 URL。\n\n**English**\n\nURL of the product image."
          },
          "status": {
            "type": "integer",
            "enum": [
              0,
              1
            ],
            "description": "**中文**\n\n启用状态，1 表示启用，0 表示停用。\n\n**English**\n\nEnabled status. 1 means enabled and 0 means disabled."
          }
        }
      },
      "ProductPageData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "page"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "description": "**中文**\n\n符合查询条件的本页商品记录。\n\n**English**\n\nProduct records in this page matching the query."
          },
          "page": {
            "$ref": "#/components/schemas/PageMeta"
          }
        }
      },
      "ProductPageEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/ProductPageData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "Region": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "regionId",
          "regionCode",
          "name",
          "level",
          "countryCode",
          "sortOrder"
        ],
        "properties": {
          "regionId": {
            "$ref": "#/components/schemas/IdString"
          },
          "parentId": {
            "type": "string",
            "nullable": true,
            "minLength": 1,
            "description": "**中文**\n\n上级行政区划 ID，顶级区划为 null。\n\n**English**\n\nParent administrative region ID, or null for a top-level region."
          },
          "regionCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n标准行政区划编码。\n\n**English**\n\nStandard administrative region code."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n按请求语言解析的行政区划显示名称。\n\n**English**\n\nAdministrative region display name resolved for the requested language."
          },
          "level": {
            "type": "integer",
            "description": "**中文**\n\n行政区划层级，1 表示省或直辖市，2 表示市，3 表示区县。\n\n**English**\n\nAdministrative region level. 1 denotes a province or municipality, 2 a city, and 3 a district or county."
          },
          "countryCode": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n行政区划所属的国家或地区编码。\n\n**English**\n\nCountry or territory code of the administrative region."
          },
          "sortOrder": {
            "type": "integer",
            "description": "**中文**\n\n业务对象的排序号。\n\n**English**\n\nOrdering value of the business object."
          }
        }
      },
      "RegionListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Region"
            },
            "description": "**中文**\n\n符合查询条件的行政区划列表。\n\n**English**\n\nList of administrative regions matching the query."
          }
        }
      },
      "RegionListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ],
            "description": "**中文**\n\n业务响应状态码，成功固定为 0。\n\n**English**\n\nBusiness response status code, always 0 on success."
          },
          "data": {
            "$ref": "#/components/schemas/RegionListData"
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的可读提示信息。\n\n**English**\n\nHuman-readable message for callers and troubleshooting."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n本次请求的唯一追踪标识。\n\n**English**\n\nUnique trace identifier for this request."
          }
        }
      },
      "DeleteOrgUnitResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "orgUnitId",
          "deleted"
        ],
        "properties": {
          "orgUnitId": {
            "$ref": "#/components/schemas/UidString"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DeleteOrgUnitEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/DeleteOrgUnitResult"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SpaceCategory": {
        "type": "string",
        "enum": [
          "STRUCTURAL",
          "ZONE",
          "PORTAL",
          "FIXTURE"
        ]
      },
      "SpaceType": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "typeCode",
          "name",
          "category",
          "supportsSlot",
          "isBuiltin",
          "attrSchema",
          "defaultAttrs",
          "sortOrder"
        ],
        "properties": {
          "typeCode": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "name": {
            "type": "string",
            "description": "**中文**\n\n按请求语言解析后的显示名。\n\n**English**\n\nDisplay name resolved for the requested language."
          },
          "category": {
            "$ref": "#/components/schemas/SpaceCategory"
          },
          "supportsSlot": {
            "type": "boolean"
          },
          "isBuiltin": {
            "type": "boolean"
          },
          "attrSchema": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "**中文**\n\n空间 attrs 的 JSON Schema。\n\n**English**\n\nJSON Schema for the space's attrs."
          },
          "defaultAttrs": {
            "type": "object",
            "additionalProperties": true,
            "nullable": true,
            "description": "**中文**\n\n类型默认属性。\n\n**English**\n\nDefault attributes of the type."
          },
          "sortOrder": {
            "type": "integer"
          }
        }
      },
      "SpaceRelation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "parentType",
          "childType",
          "maxDepth"
        ],
        "properties": {
          "parentType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "**中文**\n\n父空间类型编码，SITE 表示场所根节点。\n\n**English**\n\nParent space type code; SITE represents the site root."
          },
          "childType": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "maxDepth": {
            "type": "integer",
            "minimum": 1,
            "nullable": true,
            "description": "**中文**\n\n最大递归嵌套层数，null 表示无额外层级上限。\n\n**English**\n\nMaximum recursive nesting depth. null means no additional depth limit."
          }
        }
      },
      "SpaceTypeListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "relations"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceType"
            }
          },
          "relations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceRelation"
            }
          }
        }
      },
      "SpaceTypeListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/SpaceTypeListData"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "OperatingStatus": {
        "type": "string",
        "description": "**中文**\n\n场所经营状态，对应内部值 2=PRE_OPENING，1=OPERATING，0=CLOSED。闭店记录仍可查询。\n\n**English**\n\nSite operating status, corresponding to internal values 2=PRE_OPENING, 1=OPERATING and 0=CLOSED. Closed records remain queryable.",
        "enum": [
          "PRE_OPENING",
          "OPERATING",
          "CLOSED"
        ]
      },
      "BusinessHourSegment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "startTime",
          "endTime",
          "endNextDay"
        ],
        "properties": {
          "startTime": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "description": "**中文**\n\n场所当地时间 HH:mm。\n\n**English**\n\nLocal time at the site in HH:mm format."
          },
          "endTime": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
            "description": "**中文**\n\n场所当地时间 HH:mm。\n\n**English**\n\nLocal time at the site in HH:mm format."
          },
          "endNextDay": {
            "type": "boolean",
            "description": "**中文**\n\n仅最后一段可跨至次日结束。\n\n**English**\n\nOnly the last segment may end on the next day."
          }
        }
      },
      "WeeklyBusinessDay": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "dayOfWeek",
          "isClosed",
          "segments"
        ],
        "properties": {
          "dayOfWeek": {
            "type": "integer",
            "minimum": 1,
            "maximum": 7,
            "description": "**中文**\n\n1 至 7 依次代表周一至周日。\n\n**English**\n\n1 through 7 represent Monday through Sunday, respectively."
          },
          "isClosed": {
            "type": "boolean",
            "description": "**中文**\n\n仅指当日歇业。\n\n**English**\n\nIndicates closure for that day only."
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BusinessHourSegment"
            },
            "description": "**中文**\n\n按营业开始时间排列；歇业时为空数组，营业时至少一段且时段不得重叠。\n\n**English**\n\nOrdered by business opening time; empty when closed, otherwise at least one segment is required and time segments must not overlap."
          }
        }
      },
      "UpdateSpaceRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "typeCode",
          "name",
          "nameI18n",
          "attrs"
        ],
        "properties": {
          "parentId": {
            "$ref": "#/components/schemas/NullableUidString"
          },
          "typeCode": {
            "type": "string"
          },
          "isSiteGate": {
            "type": "boolean",
            "default": false,
            "description": "**中文**\n\n仅场所外围出入口使用 true，此时 typeCode 为 portal。\n\n**English**\n\ntrue is used only for site perimeter entrances or exits, in which case typeCode is portal."
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "**中文**\n\n默认语言基础值。\n\n**English**\n\nBase value in the default language."
          },
          "nameI18n": {
            "$ref": "#/components/schemas/LocalizedText"
          },
          "attrs": {
            "type": "object",
            "additionalProperties": true,
            "description": "**中文**\n\n必须提交完整属性对象；显式空对象表示清空属性。\n\n**English**\n\nSubmit the complete attributes object; an explicit empty object clears attributes."
          },
          "sortOrder": {
            "type": "integer",
            "default": 0
          }
        }
      },
      "DeleteSpaceResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "spaceId",
          "deleted"
        ],
        "properties": {
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DeleteSpaceEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/DeleteSpaceResult"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Point": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "x",
          "y"
        ],
        "properties": {
          "x": {
            "type": "number",
            "format": "double"
          },
          "y": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "OriginPoint": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "x",
          "y"
        ],
        "properties": {
          "x": {
            "type": "number",
            "format": "double"
          },
          "y": {
            "type": "number",
            "format": "double"
          }
        },
        "nullable": true,
        "description": "**中文**\n\n底图像素坐标中对应米制原点的位置；未标定时为 null。\n\n**English**\n\nPosition in base-image pixel coordinates corresponding to the metric origin; null when uncalibrated."
      },
      "SpacePlan": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "planId",
          "tenantId",
          "siteId",
          "scopeSpaceId",
          "name",
          "imageWidthPx",
          "imageHeightPx",
          "scaleMeterPerPx",
          "originPoint",
          "boundaryPolygon",
          "versionNo"
        ],
        "properties": {
          "planId": {
            "$ref": "#/components/schemas/UidString"
          },
          "tenantId": {
            "$ref": "#/components/schemas/UidString"
          },
          "siteId": {
            "$ref": "#/components/schemas/UidString"
          },
          "scopeSpaceId": {
            "$ref": "#/components/schemas/NullableUidString"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "imageWidthPx": {
            "type": "integer",
            "minimum": 1
          },
          "imageHeightPx": {
            "type": "integer",
            "minimum": 1
          },
          "scaleMeterPerPx": {
            "type": "number",
            "format": "double",
            "minimum": 1e-9,
            "nullable": true,
            "description": "**中文**\n\n每像素对应的米数，已标定时大于零，未标定时为 null。\n\n**English**\n\nMeters per pixel; greater than zero when calibrated and null when uncalibrated."
          },
          "originPoint": {
            "$ref": "#/components/schemas/OriginPoint"
          },
          "boundaryPolygon": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Point"
            },
            "nullable": true,
            "minItems": 3,
            "description": "**中文**\n\n米制多边形顶点，null 表示未设置。\n\n**English**\n\nPolygon vertices in meters. null indicates that no polygon is set."
          },
          "versionNo": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "SpacePlanEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/SpacePlan"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SpacePlanListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpacePlan"
            }
          }
        }
      },
      "SpacePlanListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/SpacePlanListData"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "PlanCalibration": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scaleMeterPerPx",
          "originPoint"
        ],
        "properties": {
          "scaleMeterPerPx": {
            "type": "number",
            "format": "double",
            "minimum": 1e-9,
            "description": "**中文**\n\n每像素对应的米数，须大于零，最小可存储值为 0.000000001。\n\n**English**\n\nMeters per pixel; must be greater than zero, with a minimum storable value of 0.000000001."
          },
          "originPoint": {
            "$ref": "#/components/schemas/Point"
          }
        },
        "description": "**中文**\n\n图纸标定参数，原点为底图像素坐标中对应米制原点的位置，须与比例尺同时提供。\n\n**English**\n\nPlan calibration parameters. The origin is the position in base-image pixel coordinates corresponding to the metric origin and must be provided together with the scale."
      },
      "UpdatePlanRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "description": "**中文**\n\n省略范围、标定或边界且未启用对应清除标志时保留现有值；清除标志为 true 时清空对应值。\n\n**English**\n\nOmitting the scope, calibration or boundary while leaving the corresponding clear flag unset retains its existing value. A clear flag of true clears its corresponding value.",
        "not": {
          "anyOf": [
            {
              "required": [
                "scopeSpaceId",
                "clearScopeSpace"
              ],
              "properties": {
                "clearScopeSpace": {
                  "type": "boolean",
                  "enum": [
                    true
                  ]
                }
              }
            },
            {
              "required": [
                "calibration",
                "clearCalibration"
              ],
              "properties": {
                "clearCalibration": {
                  "type": "boolean",
                  "enum": [
                    true
                  ]
                }
              }
            },
            {
              "required": [
                "boundaryPolygon",
                "clearBoundaryPolygon"
              ],
              "properties": {
                "clearBoundaryPolygon": {
                  "type": "boolean",
                  "enum": [
                    true
                  ]
                }
              }
            }
          ]
        },
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "scopeSpaceId": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UidString"
              }
            ],
            "description": "**中文**\n\n提供时绑定同场所楼层，省略时保留原范围。\n\n**English**\n\nWhen supplied, bind the plan to a floor in the same site; omission retains the existing scope."
          },
          "clearScopeSpace": {
            "type": "boolean",
            "default": false,
            "description": "**中文**\n\n为 true 时清空楼层绑定，使图纸成为整场图；与 scopeSpaceId 互斥。\n\n**English**\n\nWhen true, clear the floor binding so that the plan covers the entire site; mutually exclusive with scopeSpaceId."
          },
          "calibration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PlanCalibration"
              }
            ],
            "description": "**中文**\n\n提供时同时更新比例尺和原点，省略时保留原标定。\n\n**English**\n\nWhen supplied, update the scale and origin together; omission retains the existing calibration."
          },
          "clearCalibration": {
            "type": "boolean",
            "default": false,
            "description": "**中文**\n\n为 true 时清空标定；与 calibration 互斥。存在生效布局时返回 409 或 422。\n\n**English**\n\nWhen true, clear calibration; mutually exclusive with calibration. Returns 409 or 422 if effective layouts exist."
          },
          "boundaryPolygon": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Point"
            },
            "minItems": 3,
            "description": "**中文**\n\n提供时替换米制边界多边形顶点，省略时保留原边界。\n\n**English**\n\nWhen supplied, replace the boundary polygon vertices in meters; omission retains the existing boundary."
          },
          "clearBoundaryPolygon": {
            "type": "boolean",
            "default": false,
            "description": "**中文**\n\n为 true 时清空边界，与 boundaryPolygon 互斥。\n\n**English**\n\nWhen true, clear the boundary; mutually exclusive with boundaryPolygon."
          }
        }
      },
      "DeletePlanResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "planId",
          "deleted"
        ],
        "properties": {
          "planId": {
            "$ref": "#/components/schemas/UidString"
          },
          "deleted": {
            "type": "boolean"
          }
        }
      },
      "DeletePlanEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/DeletePlanResult"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "LayoutPose": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "x",
          "y",
          "width",
          "height",
          "rotation"
        ],
        "properties": {
          "x": {
            "type": "number",
            "format": "double"
          },
          "y": {
            "type": "number",
            "format": "double"
          },
          "width": {
            "type": "number",
            "format": "double",
            "minimum": 0
          },
          "height": {
            "type": "number",
            "format": "double",
            "minimum": 0
          },
          "rotation": {
            "type": "number",
            "format": "double",
            "description": "**中文**\n\n旋转角，单位为度。\n\n**English**\n\nRotation angle in degrees."
          }
        },
        "description": "**中文**\n\n中心点与尺寸采用米制坐标。\n\n**English**\n\nCenter point and dimensions use metric coordinates."
      },
      "SpaceLayout": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "layoutId",
          "planId",
          "spaceId",
          "pose",
          "outlinePolygon",
          "validFrom"
        ],
        "properties": {
          "layoutId": {
            "$ref": "#/components/schemas/UidString"
          },
          "planId": {
            "$ref": "#/components/schemas/UidString"
          },
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "pose": {
            "$ref": "#/components/schemas/LayoutPose"
          },
          "outlinePolygon": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Point"
            },
            "nullable": true,
            "minItems": 3,
            "description": "**中文**\n\n米制多边形顶点，null 表示未设置。\n\n**English**\n\nPolygon vertices in meters. null indicates that no polygon is set."
          },
          "validFrom": {
            "type": "string",
            "format": "date-time",
            "description": "**中文**\n\n布局版本的生效时刻。\n\n**English**\n\nEffective instant of the layout version."
          }
        }
      },
      "SpaceLayoutInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "spaceId",
          "pose"
        ],
        "properties": {
          "spaceId": {
            "$ref": "#/components/schemas/UidString"
          },
          "pose": {
            "$ref": "#/components/schemas/LayoutPose"
          },
          "outlinePolygon": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Point"
            },
            "nullable": true,
            "minItems": 3,
            "description": "**中文**\n\n米制多边形顶点，null 表示未设置。\n\n**English**\n\nPolygon vertices in meters. null indicates that no polygon is set."
          }
        }
      },
      "SavePlanLayoutsRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items",
          "expectedPlanVersion",
          "expectedLayoutIds"
        ],
        "properties": {
          "expectedPlanVersion": {
            "type": "integer",
            "minimum": 1,
            "description": "**中文**\n\n编辑时读取的图纸 versionNo。\n\n**English**\n\nPlan versionNo read at the start of editing."
          },
          "expectedLayoutIds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UidString"
            },
            "description": "**中文**\n\n编辑时读取的完整当前布局 ID 列表；无布局时传空数组。\n\n**English**\n\nComplete list of current layout IDs read at the start of editing; use an empty array if no layouts exist."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceLayoutInput"
            },
            "description": "**中文**\n\n必须提交整批布局；每个 spaceId 至多出现一次。显式空数组关闭全部当前布局。\n\n**English**\n\nSubmit the entire batch of layouts; each spaceId may appear at most once. An explicit empty array closes all current layouts."
          }
        }
      },
      "PlanLayoutListData": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpaceLayout"
            }
          }
        }
      },
      "PlanLayoutListEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "enum": [
              0
            ]
          },
          "data": {
            "$ref": "#/components/schemas/PlanLayoutListData"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "data",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "minimum": 1,
            "description": "**中文**\n\n稳定非零业务错误码，与 HTTP 错误状态共同表达失败。\n\n**English**\n\nStable nonzero business error code. It represents failure together with the HTTP error status."
          },
          "data": {
            "type": "object",
            "nullable": true,
            "maxProperties": 0,
            "description": "**中文**\n\n失败响应固定为 `null`。\n\n**English**\n\nAlways null in failure responses."
          },
          "message": {
            "type": "string",
            "description": "**中文**\n\n面向调用方与排查的英文错误描述，不包含内部 SQL、凭据或隐藏对象详情。\n\n**English**\n\nEnglish error description for callers and troubleshooting, excluding internal SQL, credentials, and details of hidden objects."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "**中文**\n\n与响应头 `X-Request-Id` 相同，用于日志定位。\n\n**English**\n\nMatches X-Request-Id in the response header and is used to locate log entries."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "**中文**\n\n`40002` 必须返回 `UNSUPPORTED_*` 或 `TARGET_*` 错误子码。\n`40301` 可以附带 `SCOPE_NOT_AUTHORIZED`。\n`40901` 可附带租户启用失败或组织关联冲突的错误子码。\n其余错误可省略此字段或返回 `null`。\n\n**English**\n\n40002 must return a UNSUPPORTED_* or TARGET_* error subcode.\n40301 may include SCOPE_NOT_AUTHORIZED.\n40901 may include an error subcode for tenant enablement failure or organization association conflict.\nOther errors may omit this field or return null.",
            "enum": [
              "UNSUPPORTED_ROLLUP_ORG",
              "UNSUPPORTED_ROLLUP_SPACE",
              "UNSUPPORTED_ROLLUP_TIME",
              "TARGET_DIMENSION_MISSING",
              "TARGET_SCOPE_CONFLICT",
              "UNSUPPORTED_SPACE_TYPE",
              "UNSUPPORTED_SLOT_TYPE",
              "UNSUPPORTED_GRANULARITY",
              "UNSUPPORTED_DIMENSION",
              "UNSUPPORTED_FILTER_OPERATOR",
              "SCOPE_NOT_AUTHORIZED",
              "INVALID_TOKEN",
              "INVALID_REQUEST",
              "ORGANIZATION_REQUIRED",
              "TENANT_ACCESS_DENIED",
              "ACCESS_DENIED",
              "ADMIN_GROUP_CONFLICT",
              "IDENTITY_UNAVAILABLE",
              "IDENTITY_REQUEST_FAILED",
              "MEMBERSHIP_UPDATE_INCOMPLETE",
              "TENANT_EXPIRED",
              "TENANT_NOT_PROVISIONED",
              "ORGANIZATION_CONFLICT",
              null,
              "IDENTITY_CREATE_UNCONFIRMED",
              "USER_CREATE_INCOMPLETE",
              "USER_CREATE_FAILED",
              "TENANT_PROVISIONING_INCOMPLETE",
              "TENANT_PROVISIONING_UNCONFIRMED",
              "ORGANIZATION_DISABLED"
            ]
          },
          "params": {
            "type": "object",
            "description": "**中文**\n\n由错误标识对应的契约定义的文案插值参数，仅供文案插值，不得包含敏感数据。\n\n**English**\n\nMessage interpolation parameters as defined by the contract for the error identifier, used only for interpolation. They must not contain sensitive data.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ErrorParamValue"
            }
          }
        }
      },
      "ErrorParamValue": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          }
        ],
        "description": "**中文**\n\n错误文案插值参数的值，支持字符串或数值。\n\n**English**\n\nError message interpolation parameter value, either a string or a number."
      },
      "UidString": {
        "type": "string",
        "minLength": 1,
        "maxLength": 36,
        "description": "**中文**\n\n双键实体的不可变外部标识 uid。新建实体使用 UUIDv7，6.0 迁移沿用非空、合法且唯一的源 unid。\nAPI 字段名及 X-Tenant-Id 请求头保持现有名称。纯数字值不得回退解析为内部自增 id。\n仅在字段明确约定时允许字符串 \"0\" 作为预置或无关联哨兵。\n\n**English**\n\nImmutable external UID of a dual-key entity. New entities use UUIDv7. Migration from 6.0 retains nonempty, valid and unique source UNIDs.\nAPI field names and the X-Tenant-Id request header retain their existing names. Purely numeric values must not fall back to parsing as internal auto-increment IDs.\nThe string \"0\" is permitted as a built-in or unassociated sentinel only where the field explicitly defines it."
      },
      "IdString": {
        "type": "string",
        "minLength": 1,
        "description": "**中文**\n\n非双键实体的既有标识（如角色、用户、行政区划、绑定关系），以字符串传递。\n\n**English**\n\nExisting identifiers for entities without dual keys (such as roles, users, administrative regions and bindings), transmitted as strings."
      },
      "NullableUidString": {
        "type": "string",
        "nullable": true,
        "description": "**中文**\n\n可以为 null 的 UidString，用于可空的双键实体关联。\n\n**English**\n\nA UidString that may be null, used for nullable relationships between dual-key entities.",
        "anyOf": [
          {
            "$ref": "#/components/schemas/UidString"
          },
          {
            "type": "string",
            "nullable": true,
            "enum": [
              null
            ]
          }
        ]
      },
      "LocalizedText": {
        "type": "object",
        "additionalProperties": false,
        "description": "**中文**\n\n完整翻译字典。键为平台支持的规范语言标识，值去除首尾 Unicode White_Space 后非空。创建时可省略，更新翻译字段时必须提供，空字典表示无翻译。\n\n**English**\n\nComplete translation dictionary. Keys are canonical language identifiers supported by the platform, and values must remain non-empty after trimming leading and trailing Unicode White_Space. The dictionary may be omitted during creation, is required when updating a translatable field, and an empty dictionary means no translations.",
        "properties": {
          "en-US": {
            "type": "string",
            "minLength": 1,
            "pattern": "[^\\u0009-\\u000D\\u0020\\u0085\\u00A0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]",
            "description": "**中文**\n\n英文译文（en-US）。\n\n**English**\n\nEnglish translation (en-US)."
          },
          "zh-CN": {
            "type": "string",
            "minLength": 1,
            "pattern": "[^\\u0009-\\u000D\\u0020\\u0085\\u00A0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]",
            "description": "**中文**\n\n简体中文译文（zh-CN）。\n\n**English**\n\nSimplified Chinese translation (zh-CN)."
          }
        }
      },
      "PageMeta": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "limit",
          "offset",
          "hasMore"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "**中文**\n\n本页最大条数。\n\n**English**\n\nMaximum number of records in this page."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "description": "**中文**\n\n跳过的记录条数。\n\n**English**\n\nNumber of records skipped."
          },
          "hasMore": {
            "type": "boolean",
            "description": "**中文**\n\n当前页之后是否还有更多记录。\n\n**English**\n\nWhether additional records exist after this page."
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "nullable": true,
            "description": "**中文**\n\n符合条件的总条数；未请求总数统计时可为 `null` 或省略。\n\n**English**\n\nTotal number of matching records. It may be null or omitted when a total count was not requested."
          }
        }
      }
    },
    "parameters": {
      "AcceptLanguage": {
        "name": "Accept-Language",
        "in": "header",
        "required": false,
        "description": "**中文**\n\n业务数据显示语言。按权重匹配 en-US、zh-CN 或对应语言前缀，无法匹配时使用基础字段。\n\n**English**\n\nLanguage for business data display. Match en-US, zh-CN, or the corresponding language prefixes by preference weight. Fall back to base fields if no language matches.",
        "schema": {
          "type": "string"
        }
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "**中文**\n\n本次请求唯一追踪标识，与响应体 `requestId` 一致。\n\n**English**\n\nUnique trace identifier for this request, matching requestId in the response body.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "**中文**\n\n凭证缺失、无效或已过期（code 40101）。\n\n**English**\n\nCredentials missing, invalid, or expired (code 40101).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40101,
              "data": null,
              "message": "Authentication required or token expired.",
              "requestId": "550e8400-e29b-41d4-a716-446655440001"
            }
          }
        }
      },
      "Forbidden": {
        "description": "**中文**\n\n无权访问目标资源（code 40301）。\n\n**English**\n\nUnauthorized access to the target resource (code 40301).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40301,
              "data": null,
              "message": "Access denied for the requested scope or resource.",
              "requestId": "550e8400-e29b-41d4-a716-446655440002"
            }
          }
        }
      },
      "NotFound": {
        "description": "**中文**\n\n目标资源不存在（code 40401）。\n\n**English**\n\nTarget resource not found (code 40401).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40401,
              "data": null,
              "message": "Requested resource not found.",
              "requestId": "550e8400-e29b-41d4-a716-446655440003"
            }
          }
        }
      },
      "BadRequest": {
        "description": "**中文**\n\n请求参数或业务组合无效（code 40001 / 40002）。\n\n**English**\n\nInvalid request parameters or business combination (code 40001 / 40002).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40001,
              "data": null,
              "message": "Invalid request parameter.",
              "requestId": "550e8400-e29b-41d4-a716-446655440000"
            }
          }
        }
      },
      "Conflict": {
        "description": "**中文**\n\n资源唯一性或生效区间冲突（code 40901）。\n\n**English**\n\nResource uniqueness or effective interval conflict (code 40901).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 40901,
              "data": null,
              "message": "Resource conflict or overlapping effective period.",
              "requestId": "550e8400-e29b-41d4-a716-446655440004"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "**中文**\n\n业务规则或协议校验失败（code 42201）。\n\n**English**\n\nBusiness rule or protocol validation failed (code 42201).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 42201,
              "data": null,
              "message": "Business validation failed.",
              "requestId": "550e8400-e29b-41d4-a716-446655440005"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "**中文**\n\n请求体或上传文件超过允许大小（code 41301）。\n\n**English**\n\nRequest body or uploaded file exceeds the permitted size (code 41301).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 41301,
              "data": null,
              "message": "Uploaded file is too large.",
              "requestId": "550e8400-e29b-41d4-a716-446655440011"
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "**中文**\n\n请求或上传文件的媒体类型不受支持（code 41501）。\n\n**English**\n\nUnsupported media type of the request or uploaded file (code 41501).",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/X-Request-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "code": 41501,
              "data": null,
              "message": "Unsupported media type.",
              "requestId": "550e8400-e29b-41d4-a716-446655440012"
            }
          }
        }
      }
    }
  }
}
