{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/twtapi-com/json-schema/twtapi-com-admin-user-plan-update-schema.json",
  "title": "AdminUserPlanUpdate",
  "description": "管理员为用户换套餐。\n\nreset_credits=True 时会按新套餐重置剩余额度（默认行为，符合「买套餐」直觉）；\n请按需关闭以免抹掉用户已充值购买的余额。\nvalidity_period 为空表示沿用套餐自身的有效期。",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twtapi-com-openapi.json#/components/schemas/AdminUserPlanUpdate",
  "properties": {
    "plan_id": {
      "type": "integer",
      "title": "Plan Id"
    },
    "reset_credits": {
      "type": "boolean",
      "title": "Reset Credits",
      "default": true
    },
    "validity_period": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Validity Period"
    }
  },
  "type": "object",
  "required": [
    "plan_id"
  ]
}