{
  "info": {
    "name": "资源管理",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "查询所有有效资源",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/resources/active",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "resources",
            "active"
          ],
          "query": [
            {
              "key": "systemId",
              "value": "",
              "description": "所属系统ID，用于过滤资源所属系统。不传则返回所有系统的有效资源"
            },
            {
              "key": "moduleId",
              "value": "",
              "description": "关联模块ID（可选）。传入时需与 systemId 搭配，用于按模块过滤资源"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取资源列表",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/resources",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "resources"
          ],
          "query": [
            {
              "key": "pageNum",
              "value": "",
              "description": "页码，默认1"
            },
            {
              "key": "pageSize",
              "value": "",
              "description": "每页数量，默认10"
            },
            {
              "key": "name",
              "value": "",
              "description": "资源名称关键词"
            },
            {
              "key": "code",
              "value": "",
              "description": "资源编码"
            },
            {
              "key": "type",
              "value": "",
              "description": "资源类型"
            },
            {
              "key": "systemId",
              "value": "",
              "description": "所属系统ID，用于过滤资源所属系统"
            },
            {
              "key": "moduleId",
              "value": "",
              "description": "关联模块ID（可选）。传入时需与 systemId 搭配，用于按模块过滤资源"
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "获取资源详情",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/resources/{id}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "resources",
            "{id}"
          ]
        }
      },
      "response": []
    },
    {
      "name": "创建资源",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"name\": \"string｜必填，资源名称\",\n  \"systemId\": \"string｜必填，所属系统ID，用于绑定资源所属系统\",\n  \"type\": \"string｜必填，资源类型，例如page/api/button\",\n  \"url\": \"string｜必填，资源URL，用于路由或接口地址\",\n  \"status\": \"number｜可选，状态：1-启用，0-禁用\",\n  \"parentId\": \"string｜可选，父级资源ID，用于构建资源树状结构，不传或传空则为根节点\",\n  \"moduleId\": \"string｜可选，关联模块ID，可为空（推荐与systemId保持一致）\",\n  \"orderNum\": \"number｜可选，排序序号（同级内升序），默认0\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/resources",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "resources"
          ]
        }
      },
      "response": []
    },
    {
      "name": "更新资源",
      "request": {
        "method": "PUT",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"name\": \"string｜必填，资源名称\",\n  \"systemId\": \"string｜可选，所属系统ID，不传则保持原值\",\n  \"type\": \"string｜必填，资源类型，例如page/api/button\",\n  \"url\": \"string｜必填，资源URL，用于路由或接口地址\",\n  \"status\": \"number｜可选，状态：1-启用，0-禁用\",\n  \"parentId\": \"string｜可选，父级资源ID，用于构建资源树状结构，不传或传空则为根节点\",\n  \"moduleId\": \"string｜可选，关联模块ID；传空字符串或null可清空关联\",\n  \"orderNum\": \"number｜可选，排序序号（同级内升序），不传则保持原值\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/resources/{id}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "resources",
            "{id}"
          ]
        }
      },
      "response": []
    },
    {
      "name": "删除资源",
      "request": {
        "method": "DELETE",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/resources/{id}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "resources",
            "{id}"
          ]
        }
      },
      "response": []
    }
  ]
}