6704 lines
238 KiB
Go
6704 lines
238 KiB
Go
// Code generated by swaggo/swag. DO NOT EDIT.
|
||
|
||
package swagger
|
||
|
||
import "github.com/swaggo/swag"
|
||
|
||
const docTemplate = `{
|
||
"schemes": {{ marshal .Schemes }},
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"description": "{{escape .Description}}",
|
||
"title": "{{.Title}}",
|
||
"termsOfService": "http://swagger.io/terms/",
|
||
"contact": {
|
||
"name": "API Support",
|
||
"url": "http://www.swagger.io/support",
|
||
"email": "support@swagger.io"
|
||
},
|
||
"license": {
|
||
"name": "MIT",
|
||
"url": "https://opensource.org/licenses/MIT"
|
||
},
|
||
"version": "{{.Version}}"
|
||
},
|
||
"host": "{{.Host}}",
|
||
"basePath": "{{.BasePath}}",
|
||
"paths": {
|
||
"/api/cu/authorization-codes": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的授权码列表,支持分页、状态筛选与授权码模糊搜索",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户端授权码管理"
|
||
],
|
||
"summary": "获取用户授权码列表",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"default": 1,
|
||
"description": "页码",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 10,
|
||
"description": "每页数量",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"normal",
|
||
"locked",
|
||
"expired"
|
||
],
|
||
"type": "string",
|
||
"description": "状态筛选",
|
||
"name": "status",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "授权码模糊匹配",
|
||
"name": "search",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.CuAuthorizationCodeListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/authorization-codes/product-activation-code": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取产品激活码:{授权码}\u0026{payload}(payload 为 RSA-PSS-SHA256 签名封装串)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户端授权码管理"
|
||
],
|
||
"summary": "获取产品激活码",
|
||
"parameters": [
|
||
{
|
||
"description": "获取产品激活码请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ProductActivationCodeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "获取成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.ProductActivationCodeResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "授权码已被锁定",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在或已过期",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/authorization-codes/summary": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的授权码统计信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户端授权码管理"
|
||
],
|
||
"summary": "获取用户授权信息统计",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.CuAuthorizationCodeSummaryResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/authorization-codes/{codeId}/share": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "用户可以将自己的授权码分享给其他用户",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"用户端授权码管理"
|
||
],
|
||
"summary": "用户分享授权码",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID",
|
||
"name": "codeId",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "分享请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeShareRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "分享成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeShareResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "授权码已被锁定",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在或目标用户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "不能分享给自己或分享数量超过可用激活数",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/devices": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的设备列表,支持分页和筛选",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户设备管理"
|
||
],
|
||
"summary": "获取设备列表",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "页码,默认1",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "每页数量,默认20,最大100",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "设备名称模糊搜索",
|
||
"name": "device_name",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "按授权码ID筛选设备",
|
||
"name": "authorization_code_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "是否在线筛选:true在线,false离线",
|
||
"name": "is_online",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "获取成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.DeviceListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/devices/summary": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的设备汇总统计信息(总数、在线数、离线数)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户设备管理"
|
||
],
|
||
"summary": "获取设备汇总统计",
|
||
"responses": {
|
||
"200": {
|
||
"description": "获取成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.DeviceSummaryResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/devices/{id}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "解绑指定的设备,物理删除许可证记录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户设备管理"
|
||
],
|
||
"summary": "解绑设备",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "许可证ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "解绑成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "无权限操作此设备",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "设备不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/forgot-password": {
|
||
"post": {
|
||
"description": "提交手机号,发送密码重置验证码到手机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "忘记密码 - 发送验证码",
|
||
"parameters": [
|
||
{
|
||
"description": "忘记密码请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserForgotPasswordRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "验证码发送成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "用户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/login": {
|
||
"post": {
|
||
"description": "通过手机号和密码或短信验证码登录客户用户账号",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "客户用户登录",
|
||
"parameters": [
|
||
{
|
||
"description": "登录信息",
|
||
"name": "user",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserLoginRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"token": {
|
||
"type": "string"
|
||
},
|
||
"user": {
|
||
"type": "object",
|
||
"properties": {
|
||
"customer_id": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"real_name": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"user_role": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "手机号、密码或验证码错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/orders": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前用户的订单列表,支持分页",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户订单管理"
|
||
],
|
||
"summary": "获取用户订单列表",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"default": 1,
|
||
"description": "页码",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 10,
|
||
"description": "每页数量",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "订单号或授权码模糊匹配",
|
||
"name": "search",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"pending",
|
||
"paid",
|
||
"cancelled"
|
||
],
|
||
"type": "string",
|
||
"description": "订单状态筛选",
|
||
"name": "status",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"today",
|
||
"week",
|
||
"month",
|
||
"three_months"
|
||
],
|
||
"type": "string",
|
||
"description": "时间筛选",
|
||
"name": "time",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.CuOrderListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的产品套餐订单,支持免费和付费模式",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户订单管理"
|
||
],
|
||
"summary": "创建订单",
|
||
"parameters": [
|
||
{
|
||
"description": "订单创建信息",
|
||
"name": "order",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuOrderCreateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "付费订单成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expire_time": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"order_no": {
|
||
"type": "string"
|
||
},
|
||
"payment_no": {
|
||
"type": "string"
|
||
},
|
||
"payment_url": {
|
||
"type": "string"
|
||
},
|
||
"total_amount": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "套餐不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "当月已购买试用版",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/orders/calculate": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据套餐和许可数量计算价格和折扣",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户订单管理"
|
||
],
|
||
"summary": "计算订单价格",
|
||
"parameters": [
|
||
{
|
||
"description": "价格计算请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"license_count": {
|
||
"type": "integer"
|
||
},
|
||
"package_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"discount_description": {
|
||
"type": "string"
|
||
},
|
||
"discount_rate": {
|
||
"type": "number"
|
||
},
|
||
"license_count": {
|
||
"type": "integer"
|
||
},
|
||
"total_amount": {
|
||
"type": "number"
|
||
},
|
||
"unit_price": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "套餐不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/orders/summary": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的订单汇总统计信息(总数、待支付数、已支付数)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户订单管理"
|
||
],
|
||
"summary": "获取订单汇总统计",
|
||
"responses": {
|
||
"200": {
|
||
"description": "获取成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.OrderSummaryResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/orders/{order_id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据订单ID获取订单详细信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户订单管理"
|
||
],
|
||
"summary": "获取订单详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "订单ID",
|
||
"name": "order_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.CuOrderResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "权限不足",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "订单不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/orders/{order_id}/cancel": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "取消当前用户的未支付订单(pending);已支付订单不允许取消",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户订单管理"
|
||
],
|
||
"summary": "取消订单",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "订单ID",
|
||
"name": "order_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.CuOrderResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request"
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized"
|
||
},
|
||
"403": {
|
||
"description": "Forbidden"
|
||
},
|
||
"404": {
|
||
"description": "Not Found"
|
||
},
|
||
"409": {
|
||
"description": "Conflict"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/packages": {
|
||
"get": {
|
||
"description": "获取所有可用的产品套餐信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户订单管理"
|
||
],
|
||
"summary": "获取套餐列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"max_devices": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"price": {
|
||
"type": "number"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/profile": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的个人资料信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "获取用户个人资料",
|
||
"responses": {
|
||
"200": {
|
||
"description": "获取成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.CuUserResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "用户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新当前登录用户的个人资料信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "更新用户个人资料",
|
||
"parameters": [
|
||
{
|
||
"description": "个人资料信息",
|
||
"name": "profile",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserProfileUpdateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "个人资料更新失败",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/profile/password": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "修改当前登录用户的密码,需要提供旧密码",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "修改用户密码",
|
||
"parameters": [
|
||
{
|
||
"description": "密码修改信息",
|
||
"name": "password",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserChangePasswordRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "密码修改失败",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/profile/phone": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新当前登录用户的手机号,需要验证新旧手机号",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "更新用户手机号",
|
||
"parameters": [
|
||
{
|
||
"description": "手机号更新信息",
|
||
"name": "phone",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserPhoneUpdateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "手机号更新失败",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/profile/send-current-phone-sms": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "发送当前手机号验证码,用于手机号更新时的身份验证",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "发送当前手机号验证码",
|
||
"responses": {
|
||
"200": {
|
||
"description": "验证码发送成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "用户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/profile/send-new-phone-sms": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "发送新手机号验证码,用于手机号更新时的可用性验证",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "发送新手机号验证码",
|
||
"parameters": [
|
||
{
|
||
"description": "新手机号信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserSendNewPhoneSmsRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "验证码发送成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "手机号已被注册",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/register": {
|
||
"post": {
|
||
"description": "通过手机号注册客户用户账号",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "客户用户注册",
|
||
"parameters": [
|
||
{
|
||
"description": "注册信息",
|
||
"name": "user",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserRegisterRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"token": {
|
||
"type": "string"
|
||
},
|
||
"user": {
|
||
"type": "object",
|
||
"properties": {
|
||
"customer_id": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"real_name": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"user_role": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "手机号已被注册",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/reset-password": {
|
||
"post": {
|
||
"description": "通过验证码重置密码",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "重置密码",
|
||
"parameters": [
|
||
{
|
||
"description": "重置密码请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserResetPasswordRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "重置密码失败",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/send-login-sms": {
|
||
"post": {
|
||
"description": "登录前发送短信验证码到手机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "登录发送验证码",
|
||
"parameters": [
|
||
{
|
||
"description": "登录发送验证码请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserSendLoginSmsRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "验证码发送成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "用户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "请求过于频繁",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "短信发送失败",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/cu/send-register-sms": {
|
||
"post": {
|
||
"description": "注册前发送短信验证码到手机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户用户管理"
|
||
],
|
||
"summary": "注册发送验证码",
|
||
"parameters": [
|
||
{
|
||
"description": "注册发送验证码请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CuUserSendRegisterSmsRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "验证码发送成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "手机号已被注册",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "请求过于频繁",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "短信发送失败",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/customers": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "分页查询客户列表,支持搜索和筛选",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户管理"
|
||
],
|
||
"summary": "查询客户列表",
|
||
"parameters": [
|
||
{
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "页码,默认1",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"maximum": 100,
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "每页条数,默认20,最大100",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "搜索关键词(支持客户编码、名称、联系人、邮箱)",
|
||
"name": "search",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"individual",
|
||
"enterprise",
|
||
"government",
|
||
"education"
|
||
],
|
||
"type": "string",
|
||
"description": "客户类型筛选",
|
||
"name": "customer_type",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"normal",
|
||
"vip",
|
||
"enterprise",
|
||
"strategic"
|
||
],
|
||
"type": "string",
|
||
"description": "客户等级筛选",
|
||
"name": "customer_level",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"active",
|
||
"disabled"
|
||
],
|
||
"type": "string",
|
||
"description": "状态筛选",
|
||
"name": "status",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"created_at",
|
||
"updated_at",
|
||
"customer_name",
|
||
"customer_code"
|
||
],
|
||
"type": "string",
|
||
"description": "排序字段,默认created_at",
|
||
"name": "sort",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"asc",
|
||
"desc"
|
||
],
|
||
"type": "string",
|
||
"description": "排序方向,默认desc",
|
||
"name": "order",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.CustomerListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的客户记录,自动生成客户编码",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户管理"
|
||
],
|
||
"summary": "创建客户",
|
||
"parameters": [
|
||
{
|
||
"description": "客户信息",
|
||
"name": "customer",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CustomerCreateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.Customer"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "客户已存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/customers/{id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据客户ID获取客户详细信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户管理"
|
||
],
|
||
"summary": "获取客户详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "客户ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.Customer"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "客户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新客户信息,所有字段都是可选的",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户管理"
|
||
],
|
||
"summary": "更新客户信息",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "客户ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "客户信息",
|
||
"name": "customer",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CustomerUpdateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.Customer"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "客户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "直接删除客户记录,删除前会检查是否有关联的授权码或许可证,如有则提示先删除授权",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户管理"
|
||
],
|
||
"summary": "删除客户",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "客户ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "客户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "客户仍有授权,无法删除",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/customers/{id}/status": {
|
||
"patch": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "修改客户状态(激活/停用)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"客户管理"
|
||
],
|
||
"summary": "修改客户状态",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "客户ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "状态信息",
|
||
"name": "status",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.CustomerStatusUpdateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "状态更新成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.Customer"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "客户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/enums": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取系统中所有枚举类型及其对应的多语言显示值",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"枚举管理"
|
||
],
|
||
"summary": "获取所有枚举值",
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.EnumListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/enums/{type}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据枚举类型获取对应的多语言显示值",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"枚举管理"
|
||
],
|
||
"summary": "获取指定类型的枚举值",
|
||
"parameters": [
|
||
{
|
||
"enum": [
|
||
"customer_type",
|
||
"customer_level",
|
||
"customer_status",
|
||
"company_size"
|
||
],
|
||
"type": "string",
|
||
"description": "枚举类型",
|
||
"name": "type",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.EnumTypeResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/payment/alipay/callback": {
|
||
"post": {
|
||
"description": "处理支付宝支付回调",
|
||
"consumes": [
|
||
"application/x-www-form-urlencoded"
|
||
],
|
||
"produces": [
|
||
"text/plain"
|
||
],
|
||
"tags": [
|
||
"支付管理"
|
||
],
|
||
"summary": "支付宝回调",
|
||
"parameters": [
|
||
{
|
||
"description": "支付宝回调参数",
|
||
"name": "notification",
|
||
"in": "body",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "success",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "failure",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/payment/history": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前用户的支付记录列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"支付管理"
|
||
],
|
||
"summary": "获取用户支付历史",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"default": 1,
|
||
"description": "页码",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 10,
|
||
"description": "每页数量",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.PaymentListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/payment/{payment_no}/status": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据支付单号获取支付状态",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"支付管理"
|
||
],
|
||
"summary": "获取支付状态",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "支付单号",
|
||
"name": "payment_no",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.PaymentStatusResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "支付单不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/activate": {
|
||
"post": {
|
||
"description": "客户端使用授权码激活软件,获取许可证文件",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"许可证激活"
|
||
],
|
||
"summary": "激活许可证",
|
||
"parameters": [
|
||
{
|
||
"description": "激活请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ActivateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "激活成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.ActivateResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "授权码已锁定或已过期",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "激活数量已达上限",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/admin/system/info": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取详细的系统信息(需要管理员权限)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"系统"
|
||
],
|
||
"summary": "获取系统信息",
|
||
"responses": {
|
||
"200": {
|
||
"description": "系统信息",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "权限不足",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/auth/refresh": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "刷新用户Token",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"认证"
|
||
],
|
||
"summary": "刷新Token",
|
||
"responses": {
|
||
"200": {
|
||
"description": "刷新成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/authorization-codes": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "分页查询授权码列表,支持筛选和排序",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "查询授权码列表",
|
||
"parameters": [
|
||
{
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "页码,默认1",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"maximum": 100,
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "每页条数,默认20,最大100",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "客户ID筛选",
|
||
"name": "customer_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"normal",
|
||
"locked",
|
||
"expired"
|
||
],
|
||
"type": "string",
|
||
"description": "状态筛选",
|
||
"name": "status",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建开始时间",
|
||
"name": "start_date",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "创建结束时间",
|
||
"name": "end_date",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"created_at",
|
||
"updated_at",
|
||
"code"
|
||
],
|
||
"type": "string",
|
||
"description": "排序字段,默认created_at",
|
||
"name": "sort",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"asc",
|
||
"desc"
|
||
],
|
||
"type": "string",
|
||
"description": "排序方向,默认desc",
|
||
"name": "order",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "创建新的授权码,自动生成授权码字符串。有效期从当天00:00:00开始,到指定天数后的23:59:59结束",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "创建授权码",
|
||
"parameters": [
|
||
{
|
||
"description": "授权码信息",
|
||
"name": "authorization_code",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeCreateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeCreateResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "客户不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "授权码已存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/authorization-codes/{id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据授权码ID获取授权码详细信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "获取授权码详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.AuthorizationCode"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "更新授权码信息,所有字段都是可选的,需要指定变更类型和原因",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "更新授权码",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "授权码信息",
|
||
"name": "authorization_code",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeUpdateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "更新成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.AuthorizationCode"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定的授权码(软删除)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "删除授权码",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/authorization-codes/{id}/changes": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "分页查询指定授权码的变更历史,支持筛选",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "查询授权变更历史列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "页码,默认1",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"maximum": 100,
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "每页条数,默认20,最大100",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "变更类型筛选",
|
||
"name": "change_type",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "操作人筛选",
|
||
"name": "operator_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "开始时间 (YYYY-MM-DD格式)",
|
||
"name": "start_date",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "结束时间 (YYYY-MM-DD格式)",
|
||
"name": "end_date",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"created_at",
|
||
"change_type"
|
||
],
|
||
"type": "string",
|
||
"description": "排序字段,默认created_at",
|
||
"name": "sort",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"asc",
|
||
"desc"
|
||
],
|
||
"type": "string",
|
||
"description": "排序方向,默认desc",
|
||
"name": "order",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.AuthorizationChangeListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/authorization-codes/{id}/download": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "下载授权码文件,包含授权码和RSA公钥,供客户端使用",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/zip"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "下载授权文件",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "包含授权码文件和RSA公钥的压缩包",
|
||
"schema": {
|
||
"type": "file"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "授权码不可用",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/authorization-codes/{id}/lock": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "锁定或解锁指定的授权码,可以设置锁定原因",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"授权码管理"
|
||
],
|
||
"summary": "锁定/解锁授权码",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "锁定/解锁信息",
|
||
"name": "lock_request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeLockRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.AuthorizationCode"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/dashboard/authorization-trend": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据时间类型(本周/本月/自定义)获取授权趋势统计数据",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"仪表盘"
|
||
],
|
||
"summary": "获取授权趋势数据",
|
||
"parameters": [
|
||
{
|
||
"enum": [
|
||
"week",
|
||
"month",
|
||
"custom"
|
||
],
|
||
"type": "string",
|
||
"description": "时间类型",
|
||
"name": "type",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "开始日期(YYYY-MM-DD格式,当type为custom时必填)",
|
||
"name": "start_date",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "结束日期(YYYY-MM-DD格式,当type为custom时必填)",
|
||
"name": "end_date",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "时区(如:Asia/Shanghai,UTC等,默认使用服务器本地时区)",
|
||
"name": "timezone",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "授权趋势数据",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.DashboardAuthorizationTrendResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "权限不足",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/dashboard/recent-authorizations": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取最近创建的授权码列表,支持按客户ID和状态筛选",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"仪表盘"
|
||
],
|
||
"summary": "获取最近授权列表",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "返回数量限制(默认20,最大100)",
|
||
"name": "limit",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "客户ID筛选",
|
||
"name": "customer_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"normal",
|
||
"locked",
|
||
"expired"
|
||
],
|
||
"type": "string",
|
||
"description": "状态筛选",
|
||
"name": "status",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "最近授权列表",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.DashboardRecentAuthorizationsResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "权限不足",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/heartbeat": {
|
||
"post": {
|
||
"description": "客户端定期发送心跳,更新在线状态和使用数据",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"许可证激活"
|
||
],
|
||
"summary": "心跳检测",
|
||
"parameters": [
|
||
{
|
||
"description": "心跳请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.HeartbeatRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "心跳成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.HeartbeatResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "许可证不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "许可证已被撤销",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/licenses": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "分页查询许可证列表,支持筛选",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"许可证管理"
|
||
],
|
||
"summary": "查询许可证列表",
|
||
"parameters": [
|
||
{
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "页码,默认1",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"maximum": 100,
|
||
"minimum": 1,
|
||
"type": "integer",
|
||
"description": "每页条数,默认20,最大100",
|
||
"name": "page_size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "授权码ID筛选",
|
||
"name": "authorization_code_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "客户ID筛选",
|
||
"name": "customer_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"active",
|
||
"inactive",
|
||
"revoked"
|
||
],
|
||
"type": "string",
|
||
"description": "状态筛选",
|
||
"name": "status",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "在线状态筛选",
|
||
"name": "is_online",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"created_at",
|
||
"updated_at",
|
||
"activated_at",
|
||
"last_heartbeat"
|
||
],
|
||
"type": "string",
|
||
"description": "排序字段,默认created_at",
|
||
"name": "sort",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"enum": [
|
||
"asc",
|
||
"desc"
|
||
],
|
||
"type": "string",
|
||
"description": "排序方向,默认desc",
|
||
"name": "order",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.LicenseListResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "为指定授权码手动创建许可证",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"许可证管理"
|
||
],
|
||
"summary": "手动添加许可证",
|
||
"parameters": [
|
||
{
|
||
"description": "许可证创建信息",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.LicenseCreateRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "创建成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.License"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "授权码不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/licenses/{id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "根据许可证ID获取许可证详细信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"许可证管理"
|
||
],
|
||
"summary": "获取许可证详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "许可证ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.LicenseDetailResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "许可证不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/licenses/{id}/download": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "下载加密的许可证文件,用于客户端软件激活",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/zip"
|
||
],
|
||
"tags": [
|
||
"许可证管理"
|
||
],
|
||
"summary": "下载许可证文件",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "许可证ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "包含许可证文件和RSA公钥的压缩包",
|
||
"schema": {
|
||
"type": "file"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "许可证不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "许可证已被撤销",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/licenses/{id}/revoke": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "撤销指定的许可证,撤销后无法再使用",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"许可证管理"
|
||
],
|
||
"summary": "撤销许可证",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "许可证ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "撤销原因",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.LicenseRevokeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "撤销成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.License"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "许可证不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "许可证已被撤销",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/login": {
|
||
"post": {
|
||
"description": "管理员用户登录接口",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"认证"
|
||
],
|
||
"summary": "用户登录",
|
||
"parameters": [
|
||
{
|
||
"description": "登录请求参数",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/models.LoginRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "登录成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.LoginResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数无效",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "用户名或密码错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/logout": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "用户登出接口",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"认证"
|
||
],
|
||
"summary": "用户登出",
|
||
"responses": {
|
||
"200": {
|
||
"description": "登出成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/stats/overview": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"BearerAuth": []
|
||
}
|
||
],
|
||
"description": "获取授权码、许可证的总体统计信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"统计分析"
|
||
],
|
||
"summary": "获取授权概览统计",
|
||
"responses": {
|
||
"200": {
|
||
"description": "查询成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.APIResponse"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/models.StatsOverviewResponse"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未认证",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/health": {
|
||
"get": {
|
||
"description": "系统健康状态检查",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"系统"
|
||
],
|
||
"summary": "健康检测",
|
||
"responses": {
|
||
"200": {
|
||
"description": "健康状态",
|
||
"schema": {
|
||
"$ref": "#/definitions/models.HealthResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"models.APIResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"data": {},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"timestamp": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ActivateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"authorization_code",
|
||
"hardware_fingerprint"
|
||
],
|
||
"properties": {
|
||
"authorization_code": {
|
||
"description": "授权码,必填",
|
||
"type": "string"
|
||
},
|
||
"device_info": {
|
||
"description": "设备信息,可选",
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"hardware_fingerprint": {
|
||
"description": "硬件指纹,必填",
|
||
"type": "string"
|
||
},
|
||
"software_version": {
|
||
"description": "软件版本,可选",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ActivateResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"heartbeat_interval": {
|
||
"description": "心跳间隔(秒)",
|
||
"type": "integer"
|
||
},
|
||
"license_file": {
|
||
"description": "base64编码的加密许可证文件",
|
||
"type": "string"
|
||
},
|
||
"license_key": {
|
||
"description": "许可证密钥",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationChangeListItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"change_type": {
|
||
"description": "变更类型",
|
||
"type": "string"
|
||
},
|
||
"change_type_display": {
|
||
"description": "变更类型显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"description": "创建时间",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "变更记录ID",
|
||
"type": "string"
|
||
},
|
||
"operator_id": {
|
||
"description": "操作人ID",
|
||
"type": "string"
|
||
},
|
||
"operator_name": {
|
||
"description": "操作人名称",
|
||
"type": "string"
|
||
},
|
||
"reason": {
|
||
"description": "变更原因",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationChangeListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"list": {
|
||
"description": "变更历史列表",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.AuthorizationChangeListItem"
|
||
}
|
||
},
|
||
"page": {
|
||
"description": "当前页码",
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"description": "每页条数",
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"description": "总记录数",
|
||
"type": "integer"
|
||
},
|
||
"total_pages": {
|
||
"description": "总页数",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCode": {
|
||
"type": "object",
|
||
"properties": {
|
||
"activated_licenses_count": {
|
||
"description": "该授权码下已激活的许可证数量",
|
||
"type": "integer"
|
||
},
|
||
"code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"description": "创建时间",
|
||
"type": "string"
|
||
},
|
||
"created_by": {
|
||
"description": "创建人ID",
|
||
"type": "string"
|
||
},
|
||
"current_activations": {
|
||
"description": "当前激活次数",
|
||
"type": "integer"
|
||
},
|
||
"custom_parameters": {
|
||
"description": "自定义参数(JSON对象)",
|
||
"type": "object"
|
||
},
|
||
"customer_id": {
|
||
"description": "客户ID",
|
||
"type": "string"
|
||
},
|
||
"customer_info": {
|
||
"description": "客户信息(仅在详情接口返回)",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.CustomerInfoForAuthCode"
|
||
}
|
||
]
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称",
|
||
"type": "string"
|
||
},
|
||
"customer_name_display": {
|
||
"description": "客户名称显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"deployment_type": {
|
||
"description": "部署类型:standalone/cloud/hybrid",
|
||
"type": "string"
|
||
},
|
||
"deployment_type_display": {
|
||
"description": "部署类型显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"description": "描述",
|
||
"type": "string"
|
||
},
|
||
"encryption_type": {
|
||
"description": "加密类型:standard/advanced",
|
||
"type": "string"
|
||
},
|
||
"encryption_type_display": {
|
||
"description": "加密类型显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"end_date": {
|
||
"description": "失效日期",
|
||
"type": "string"
|
||
},
|
||
"feature_config": {
|
||
"description": "功能配置(JSON对象)",
|
||
"type": "object"
|
||
},
|
||
"id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
},
|
||
"is_locked": {
|
||
"description": "是否锁定",
|
||
"type": "boolean"
|
||
},
|
||
"lock_reason": {
|
||
"description": "锁定原因",
|
||
"type": "string"
|
||
},
|
||
"locked_at": {
|
||
"description": "锁定时间",
|
||
"type": "string"
|
||
},
|
||
"locked_by": {
|
||
"description": "锁定人ID",
|
||
"type": "string"
|
||
},
|
||
"max_activations": {
|
||
"description": "最大激活次数",
|
||
"type": "integer"
|
||
},
|
||
"software_id": {
|
||
"description": "软件ID",
|
||
"type": "string"
|
||
},
|
||
"software_version": {
|
||
"description": "软件版本",
|
||
"type": "string"
|
||
},
|
||
"start_date": {
|
||
"description": "生效日期",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "状态:normal/locked/expired",
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"description": "状态显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"description": "更新时间",
|
||
"type": "string"
|
||
},
|
||
"usage_limits": {
|
||
"description": "使用限制(JSON对象)",
|
||
"type": "object"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeCreateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"customer_id",
|
||
"deployment_type",
|
||
"max_activations",
|
||
"validity_days"
|
||
],
|
||
"properties": {
|
||
"custom_parameters": {
|
||
"description": "自定义参数(JSON对象)"
|
||
},
|
||
"customer_id": {
|
||
"description": "客户ID",
|
||
"type": "string"
|
||
},
|
||
"deployment_type": {
|
||
"description": "部署类型:standalone/cloud/hybrid",
|
||
"type": "string",
|
||
"enum": [
|
||
"standalone",
|
||
"cloud",
|
||
"hybrid"
|
||
]
|
||
},
|
||
"description": {
|
||
"description": "描述",
|
||
"type": "string",
|
||
"maxLength": 1000
|
||
},
|
||
"encryption_type": {
|
||
"description": "加密类型:standard/advanced",
|
||
"type": "string",
|
||
"enum": [
|
||
"standard",
|
||
"advanced"
|
||
]
|
||
},
|
||
"feature_config": {
|
||
"description": "功能配置(JSON对象)"
|
||
},
|
||
"max_activations": {
|
||
"description": "最大激活次数",
|
||
"type": "integer",
|
||
"minimum": 1
|
||
},
|
||
"software_id": {
|
||
"description": "软件ID",
|
||
"type": "string"
|
||
},
|
||
"software_version": {
|
||
"description": "软件版本",
|
||
"type": "string"
|
||
},
|
||
"usage_limits": {
|
||
"description": "使用限制(JSON对象)"
|
||
},
|
||
"validity_days": {
|
||
"description": "有效天数(1-365000天,365000代表永久有效)",
|
||
"type": "integer",
|
||
"maximum": 365000,
|
||
"minimum": 1
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeCreateResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeListItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"description": "创建时间",
|
||
"type": "string"
|
||
},
|
||
"current_activations": {
|
||
"description": "当前激活次数",
|
||
"type": "integer"
|
||
},
|
||
"customer_id": {
|
||
"description": "客户ID",
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称",
|
||
"type": "string"
|
||
},
|
||
"customer_name_display": {
|
||
"description": "客户名称显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"deployment_type": {
|
||
"description": "部署类型:standalone/cloud/hybrid",
|
||
"type": "string"
|
||
},
|
||
"deployment_type_display": {
|
||
"description": "部署类型显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"description": "描述",
|
||
"type": "string"
|
||
},
|
||
"end_date": {
|
||
"description": "失效日期",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
},
|
||
"is_locked": {
|
||
"description": "是否锁定",
|
||
"type": "boolean"
|
||
},
|
||
"max_activations": {
|
||
"description": "最大激活次数",
|
||
"type": "integer"
|
||
},
|
||
"start_date": {
|
||
"description": "生效日期",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "状态:normal/locked/expired",
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"description": "状态显示(多语言)",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"list": {
|
||
"description": "授权码列表",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.AuthorizationCodeListItem"
|
||
}
|
||
},
|
||
"page": {
|
||
"description": "当前页码",
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"description": "每页条数",
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"description": "总记录数",
|
||
"type": "integer"
|
||
},
|
||
"total_pages": {
|
||
"description": "总页数",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeLockRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"is_locked": {
|
||
"description": "true-锁定,false-解锁",
|
||
"type": "boolean"
|
||
},
|
||
"lock_reason": {
|
||
"description": "锁定原因",
|
||
"type": "string",
|
||
"maxLength": 500
|
||
},
|
||
"reason": {
|
||
"description": "变更原因(记录到变更历史)",
|
||
"type": "string",
|
||
"maxLength": 500
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeShareRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"share_count",
|
||
"target_user_id"
|
||
],
|
||
"properties": {
|
||
"share_count": {
|
||
"description": "分享激活次数",
|
||
"type": "integer",
|
||
"minimum": 1
|
||
},
|
||
"target_user_id": {
|
||
"description": "受赠用户ID",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeShareResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"new_authorization_code": {
|
||
"description": "新生成的授权码信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.AuthorizationCodeShareResponseItem"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeShareResponseItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"end_date": {
|
||
"description": "结束时间",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
},
|
||
"max_activations": {
|
||
"description": "最大激活次数",
|
||
"type": "integer"
|
||
},
|
||
"start_date": {
|
||
"description": "开始时间",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationCodeUpdateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"change_type"
|
||
],
|
||
"properties": {
|
||
"change_type": {
|
||
"description": "变更类型:renewal/upgrade/limit_change/feature_toggle/lock/unlock/other",
|
||
"type": "string",
|
||
"enum": [
|
||
"renewal",
|
||
"feature_limit_change",
|
||
"lock",
|
||
"unlock",
|
||
"other"
|
||
]
|
||
},
|
||
"custom_parameters": {
|
||
"description": "自定义参数"
|
||
},
|
||
"deployment_type": {
|
||
"description": "部署类型:standalone/cloud/hybrid",
|
||
"type": "string",
|
||
"enum": [
|
||
"standalone",
|
||
"cloud",
|
||
"hybrid"
|
||
]
|
||
},
|
||
"description": {
|
||
"description": "描述",
|
||
"type": "string",
|
||
"maxLength": 1000
|
||
},
|
||
"encryption_type": {
|
||
"description": "加密类型:standard/advanced",
|
||
"type": "string",
|
||
"enum": [
|
||
"standard",
|
||
"advanced"
|
||
]
|
||
},
|
||
"end_date": {
|
||
"description": "失效日期(YYYY-MM-DD)",
|
||
"type": "string"
|
||
},
|
||
"feature_config": {
|
||
"description": "功能配置"
|
||
},
|
||
"max_activations": {
|
||
"description": "最大激活次数",
|
||
"type": "integer",
|
||
"minimum": 1
|
||
},
|
||
"reason": {
|
||
"description": "变更原因",
|
||
"type": "string",
|
||
"maxLength": 500
|
||
},
|
||
"software_id": {
|
||
"description": "软件ID",
|
||
"type": "string"
|
||
},
|
||
"software_version": {
|
||
"description": "软件版本",
|
||
"type": "string"
|
||
},
|
||
"start_date": {
|
||
"description": "可选的起止时间(优先于 validity_days),格式:YYYY-MM-DD",
|
||
"type": "string"
|
||
},
|
||
"usage_limits": {
|
||
"description": "使用限制"
|
||
},
|
||
"validity_days": {
|
||
"description": "有效天数(1-365000天,365000代表永久有效)",
|
||
"type": "integer",
|
||
"maximum": 365000,
|
||
"minimum": 1
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authorization_code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"authorization_code_id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"description": "授权描述",
|
||
"type": "string"
|
||
},
|
||
"end_date": {
|
||
"description": "授权到期时间",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.AuthorizationStats": {
|
||
"type": "object",
|
||
"properties": {
|
||
"active_licenses": {
|
||
"description": "已激活许可证数量",
|
||
"type": "integer"
|
||
},
|
||
"expired_auth_codes": {
|
||
"description": "已过期授权码数量",
|
||
"type": "integer"
|
||
},
|
||
"expired_licenses": {
|
||
"description": "已过期许可证数量",
|
||
"type": "integer"
|
||
},
|
||
"expiring_soon_auth_codes": {
|
||
"description": "30日内即将到期授权码数量",
|
||
"type": "integer"
|
||
},
|
||
"inactive_licenses": {
|
||
"description": "未激活许可证数量",
|
||
"type": "integer"
|
||
},
|
||
"total_auth_codes": {
|
||
"description": "总授权码数量",
|
||
"type": "integer"
|
||
},
|
||
"total_licenses": {
|
||
"description": "总许可证数量",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.CuAuthorizationCodeListItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"current_activations": {
|
||
"type": "integer"
|
||
},
|
||
"end_date": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"max_activations": {
|
||
"type": "integer"
|
||
},
|
||
"remaining_activations": {
|
||
"type": "integer"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuAuthorizationCodeListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"list": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.CuAuthorizationCodeListItem"
|
||
}
|
||
},
|
||
"page": {
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"total_pages": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.CuAuthorizationCodeSummaryResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expired_count": {
|
||
"type": "integer"
|
||
},
|
||
"total_count": {
|
||
"type": "integer"
|
||
},
|
||
"valid_count": {
|
||
"type": "integer"
|
||
},
|
||
"valid_max_activations_sum": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.CuOrderCreateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"license_count",
|
||
"package_id"
|
||
],
|
||
"properties": {
|
||
"license_count": {
|
||
"type": "integer",
|
||
"maximum": 1000,
|
||
"minimum": 1
|
||
},
|
||
"package_id": {
|
||
"type": "string"
|
||
},
|
||
"payment_method": {
|
||
"description": "可选:支付方式,不传则为免费订单 支持:alipay,wechat",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuOrderListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"orders": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.CuOrderResponse"
|
||
}
|
||
},
|
||
"page": {
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"type": "integer"
|
||
},
|
||
"total_count": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.CuOrderResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authorization_code": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"cu_user_id": {
|
||
"type": "string"
|
||
},
|
||
"customer_id": {
|
||
"type": "string"
|
||
},
|
||
"discount_rate": {
|
||
"type": "number"
|
||
},
|
||
"expired_at": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"license_count": {
|
||
"type": "integer"
|
||
},
|
||
"order_no": {
|
||
"type": "string"
|
||
},
|
||
"package_id": {
|
||
"type": "string"
|
||
},
|
||
"package_name": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"total_amount": {
|
||
"type": "number"
|
||
},
|
||
"unit_price": {
|
||
"type": "number"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserChangePasswordRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"new_password",
|
||
"old_password"
|
||
],
|
||
"properties": {
|
||
"new_password": {
|
||
"type": "string",
|
||
"maxLength": 50,
|
||
"minLength": 8
|
||
},
|
||
"old_password": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserForgotPasswordRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"phone"
|
||
],
|
||
"properties": {
|
||
"phone": {
|
||
"type": "string",
|
||
"maxLength": 20,
|
||
"minLength": 7
|
||
},
|
||
"phone_country_code": {
|
||
"description": "可选,默认+86",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserLoginRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"login_type",
|
||
"phone"
|
||
],
|
||
"properties": {
|
||
"login_type": {
|
||
"description": "登录类型:password 或 sms",
|
||
"type": "string",
|
||
"enum": [
|
||
"password",
|
||
"sms"
|
||
]
|
||
},
|
||
"password": {
|
||
"description": "密码登录时必填",
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"type": "string",
|
||
"maxLength": 20,
|
||
"minLength": 7
|
||
},
|
||
"phone_country_code": {
|
||
"description": "可选,默认+86",
|
||
"type": "string"
|
||
},
|
||
"sms_code": {
|
||
"description": "验证码登录时必填",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserPhoneUpdateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"current_sms_code",
|
||
"new_phone",
|
||
"new_phone_country_code",
|
||
"new_sms_code"
|
||
],
|
||
"properties": {
|
||
"current_sms_code": {
|
||
"description": "当前手机号验证码",
|
||
"type": "string"
|
||
},
|
||
"new_phone": {
|
||
"type": "string"
|
||
},
|
||
"new_phone_country_code": {
|
||
"type": "string"
|
||
},
|
||
"new_sms_code": {
|
||
"description": "新手机号验证码",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserProfileUpdateRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"additional_info": {
|
||
"type": "string"
|
||
},
|
||
"avatar_url": {
|
||
"type": "string",
|
||
"maxLength": 500
|
||
},
|
||
"email": {
|
||
"type": "string",
|
||
"maxLength": 255
|
||
},
|
||
"language": {
|
||
"type": "string",
|
||
"enum": [
|
||
"zh-CN",
|
||
"en-US",
|
||
"ja-JP"
|
||
]
|
||
},
|
||
"real_name": {
|
||
"type": "string",
|
||
"maxLength": 100
|
||
},
|
||
"remark": {
|
||
"type": "string",
|
||
"maxLength": 1000
|
||
},
|
||
"timezone": {
|
||
"type": "string",
|
||
"maxLength": 50
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserRegisterRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"password",
|
||
"phone",
|
||
"sms_code"
|
||
],
|
||
"properties": {
|
||
"customer_id": {
|
||
"description": "可选,不提供则自动创建客户",
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string",
|
||
"maxLength": 255
|
||
},
|
||
"password": {
|
||
"type": "string",
|
||
"maxLength": 50,
|
||
"minLength": 8
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"phone_country_code": {
|
||
"description": "可选,默认+86",
|
||
"type": "string"
|
||
},
|
||
"real_name": {
|
||
"type": "string",
|
||
"maxLength": 100
|
||
},
|
||
"sms_code": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserResetPasswordRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"new_password",
|
||
"phone",
|
||
"sms_code"
|
||
],
|
||
"properties": {
|
||
"new_password": {
|
||
"type": "string",
|
||
"maxLength": 50,
|
||
"minLength": 8
|
||
},
|
||
"phone": {
|
||
"type": "string",
|
||
"maxLength": 20,
|
||
"minLength": 7
|
||
},
|
||
"phone_country_code": {
|
||
"description": "可选,默认+86",
|
||
"type": "string"
|
||
},
|
||
"sms_code": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"additional_info": {
|
||
"type": "string"
|
||
},
|
||
"avatar_url": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"customer_id": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"email_verified": {
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"language": {
|
||
"type": "string"
|
||
},
|
||
"last_login_at": {
|
||
"type": "string"
|
||
},
|
||
"last_login_ip": {
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"phone_country_code": {
|
||
"type": "string"
|
||
},
|
||
"phone_verified": {
|
||
"type": "boolean"
|
||
},
|
||
"real_name": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"timezone": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
},
|
||
"user_role": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserSendLoginSmsRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"phone"
|
||
],
|
||
"properties": {
|
||
"phone": {
|
||
"type": "string",
|
||
"maxLength": 20,
|
||
"minLength": 7
|
||
},
|
||
"phone_country_code": {
|
||
"description": "可选,默认+86",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserSendNewPhoneSmsRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"new_phone"
|
||
],
|
||
"properties": {
|
||
"new_phone": {
|
||
"type": "string",
|
||
"maxLength": 20,
|
||
"minLength": 7
|
||
},
|
||
"new_phone_country_code": {
|
||
"description": "可选,默认+86",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CuUserSendRegisterSmsRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"phone"
|
||
],
|
||
"properties": {
|
||
"phone": {
|
||
"type": "string",
|
||
"maxLength": 20,
|
||
"minLength": 7
|
||
},
|
||
"phone_country_code": {
|
||
"description": "可选,默认+86",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.Customer": {
|
||
"type": "object",
|
||
"properties": {
|
||
"address": {
|
||
"type": "string"
|
||
},
|
||
"authorization_stats": {
|
||
"description": "授权统计信息(仅在详情接口返回)",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.AuthorizationStats"
|
||
}
|
||
]
|
||
},
|
||
"company_size": {
|
||
"type": "string"
|
||
},
|
||
"company_size_display": {
|
||
"type": "string"
|
||
},
|
||
"contact_person": {
|
||
"type": "string"
|
||
},
|
||
"contact_title": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"created_by": {
|
||
"type": "string"
|
||
},
|
||
"customer_code": {
|
||
"type": "string"
|
||
},
|
||
"customer_level": {
|
||
"type": "string"
|
||
},
|
||
"customer_level_display": {
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"type": "string"
|
||
},
|
||
"customer_type": {
|
||
"type": "string"
|
||
},
|
||
"customer_type_display": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"phone": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
},
|
||
"updated_by": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CustomerCreateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"contact_person",
|
||
"customer_level",
|
||
"customer_name",
|
||
"customer_type",
|
||
"status"
|
||
],
|
||
"properties": {
|
||
"address": {
|
||
"description": "地址,可选",
|
||
"type": "string",
|
||
"maxLength": 500
|
||
},
|
||
"company_size": {
|
||
"description": "企业规模,可选",
|
||
"type": "string"
|
||
},
|
||
"contact_person": {
|
||
"description": "联系人姓名,必填",
|
||
"type": "string",
|
||
"maxLength": 100
|
||
},
|
||
"contact_title": {
|
||
"description": "联系人职位,可选",
|
||
"type": "string",
|
||
"maxLength": 100
|
||
},
|
||
"customer_level": {
|
||
"description": "客户等级,必填",
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称,必填",
|
||
"type": "string",
|
||
"maxLength": 200
|
||
},
|
||
"customer_type": {
|
||
"description": "客户类型,必填",
|
||
"type": "string",
|
||
"enum": [
|
||
"individual",
|
||
"enterprise",
|
||
"government",
|
||
"education"
|
||
]
|
||
},
|
||
"description": {
|
||
"description": "描述,可选",
|
||
"type": "string",
|
||
"maxLength": 1000
|
||
},
|
||
"email": {
|
||
"description": "邮箱,可选",
|
||
"type": "string",
|
||
"maxLength": 255
|
||
},
|
||
"phone": {
|
||
"description": "电话,可选",
|
||
"type": "string",
|
||
"maxLength": 20
|
||
},
|
||
"status": {
|
||
"description": "状态,必填",
|
||
"type": "string",
|
||
"enum": [
|
||
"active",
|
||
"disabled"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"models.CustomerInfoForAuthCode": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"description": "客户创建时间",
|
||
"type": "string"
|
||
},
|
||
"customer_code": {
|
||
"description": "客户编号",
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称",
|
||
"type": "string"
|
||
},
|
||
"customer_type": {
|
||
"description": "客户类型",
|
||
"type": "string"
|
||
},
|
||
"customer_type_display": {
|
||
"description": "客户类型显示(多语言)",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "客户ID",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "客户状态",
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"description": "客户状态显示(多语言)",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CustomerListItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"contact_person": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"customer_code": {
|
||
"type": "string"
|
||
},
|
||
"customer_level": {
|
||
"type": "string"
|
||
},
|
||
"customer_level_display": {
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"type": "string"
|
||
},
|
||
"customer_type": {
|
||
"type": "string"
|
||
},
|
||
"customer_type_display": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.CustomerListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"list": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.CustomerListItem"
|
||
}
|
||
},
|
||
"page": {
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"total_pages": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.CustomerStatusUpdateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"status"
|
||
],
|
||
"properties": {
|
||
"status": {
|
||
"description": "状态,必填",
|
||
"type": "string",
|
||
"enum": [
|
||
"active",
|
||
"disabled"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"models.CustomerUpdateRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"address": {
|
||
"description": "地址,可选",
|
||
"type": "string",
|
||
"maxLength": 500
|
||
},
|
||
"company_size": {
|
||
"description": "企业规模,可选",
|
||
"type": "string"
|
||
},
|
||
"contact_person": {
|
||
"description": "联系人姓名,可选",
|
||
"type": "string",
|
||
"maxLength": 100
|
||
},
|
||
"contact_title": {
|
||
"description": "联系人职位,可选",
|
||
"type": "string",
|
||
"maxLength": 100
|
||
},
|
||
"customer_level": {
|
||
"description": "客户等级,可选",
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称,可选",
|
||
"type": "string",
|
||
"maxLength": 200
|
||
},
|
||
"customer_type": {
|
||
"description": "客户类型,可选",
|
||
"type": "string",
|
||
"enum": [
|
||
"individual",
|
||
"enterprise",
|
||
"government",
|
||
"education"
|
||
]
|
||
},
|
||
"description": {
|
||
"description": "描述,可选",
|
||
"type": "string",
|
||
"maxLength": 1000
|
||
},
|
||
"email": {
|
||
"description": "邮箱,可选",
|
||
"type": "string",
|
||
"maxLength": 255
|
||
},
|
||
"phone": {
|
||
"description": "电话,可选",
|
||
"type": "string",
|
||
"maxLength": 20
|
||
},
|
||
"status": {
|
||
"description": "状态,可选",
|
||
"type": "string",
|
||
"enum": [
|
||
"active",
|
||
"disabled"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"models.DashboardAuthorizationTrendResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"period": {
|
||
"description": "时间段信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.TrendPeriod"
|
||
}
|
||
]
|
||
},
|
||
"summary": {
|
||
"description": "汇总信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.TrendSummary"
|
||
}
|
||
]
|
||
},
|
||
"trend_data": {
|
||
"description": "趋势数据",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.TrendData"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"models.DashboardRecentAuthorizationsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"list": {
|
||
"description": "授权列表",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.RecentAuthorization"
|
||
}
|
||
},
|
||
"total": {
|
||
"description": "符合条件的授权总数量",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.DeviceListItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"activated_at": {
|
||
"description": "激活时间",
|
||
"type": "string"
|
||
},
|
||
"authorization_info": {
|
||
"description": "授权信息",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.AuthorizationInfo"
|
||
}
|
||
]
|
||
},
|
||
"device_info": {
|
||
"description": "设备信息",
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"id": {
|
||
"description": "许可证ID",
|
||
"type": "string"
|
||
},
|
||
"is_online": {
|
||
"description": "是否在线",
|
||
"type": "boolean"
|
||
},
|
||
"last_heartbeat": {
|
||
"description": "最后心跳时间",
|
||
"type": "string"
|
||
},
|
||
"last_online_ip": {
|
||
"description": "最后在线IP",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.DeviceListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"list": {
|
||
"description": "设备列表",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.DeviceListItem"
|
||
}
|
||
},
|
||
"page": {
|
||
"description": "当前页码",
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"description": "每页数量",
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"description": "总数量",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.DeviceSummaryResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"offline_devices": {
|
||
"description": "离线设备数",
|
||
"type": "integer"
|
||
},
|
||
"online_devices": {
|
||
"description": "在线设备数",
|
||
"type": "integer"
|
||
},
|
||
"total_devices": {
|
||
"description": "设备总数",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.EnumItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"display": {
|
||
"description": "多语言显示文本",
|
||
"type": "string"
|
||
},
|
||
"key": {
|
||
"description": "枚举值",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.EnumListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"enums": {
|
||
"description": "所有枚举类型",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.EnumTypeResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"models.EnumTypeResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"description": "枚举项列表",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.EnumItem"
|
||
}
|
||
},
|
||
"type": {
|
||
"description": "枚举类型名称",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ErrorResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "业务错误码,如 \"100001\", \"900001\"",
|
||
"type": "string"
|
||
},
|
||
"message": {
|
||
"description": "错误描述信息",
|
||
"type": "string"
|
||
},
|
||
"timestamp": {
|
||
"description": "错误发生时间",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.GrowthRate": {
|
||
"type": "object",
|
||
"properties": {
|
||
"auth_codes": {
|
||
"description": "授权码增长率(%)(当前总授权码数相比一个月前总授权码数的增长率)",
|
||
"type": "number"
|
||
},
|
||
"licenses": {
|
||
"description": "许可证增长率(%)(当前活跃许可证数相比一个月前活跃许可证数的增长率)",
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"models.HealthResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"services": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"system": {
|
||
"$ref": "#/definitions/models.SystemInfo"
|
||
},
|
||
"timestamp": {
|
||
"type": "string"
|
||
},
|
||
"uptime": {
|
||
"type": "string"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.HeartbeatRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"hardware_fingerprint",
|
||
"license_key"
|
||
],
|
||
"properties": {
|
||
"config_updated_at": {
|
||
"description": "客户端配置更新时间,可选",
|
||
"type": "string"
|
||
},
|
||
"hardware_fingerprint": {
|
||
"description": "硬件指纹,必填",
|
||
"type": "string"
|
||
},
|
||
"license_key": {
|
||
"description": "许可证密钥,必填",
|
||
"type": "string"
|
||
},
|
||
"software_version": {
|
||
"description": "软件版本,可选",
|
||
"type": "string"
|
||
},
|
||
"usage_data": {
|
||
"description": "使用数据,可选",
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
},
|
||
"models.HeartbeatResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"config_updated": {
|
||
"description": "配置是否有更新",
|
||
"type": "boolean"
|
||
},
|
||
"heartbeat_interval": {
|
||
"description": "下次心跳间隔(秒)",
|
||
"type": "integer"
|
||
},
|
||
"license_file": {
|
||
"description": "base64编码的新许可证文件(如有更新)",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "许可证状态",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.License": {
|
||
"type": "object",
|
||
"properties": {
|
||
"activated_at": {
|
||
"type": "string"
|
||
},
|
||
"activation_ip": {
|
||
"type": "string"
|
||
},
|
||
"authorization_code": {
|
||
"description": "关联字段(用于查询时的JOIN)",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.AuthorizationCode"
|
||
}
|
||
]
|
||
},
|
||
"authorization_code_id": {
|
||
"type": "string"
|
||
},
|
||
"config_updated_at": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"customer": {
|
||
"$ref": "#/definitions/models.Customer"
|
||
},
|
||
"customer_id": {
|
||
"type": "string"
|
||
},
|
||
"device_info": {
|
||
"type": "object"
|
||
},
|
||
"hardware_fingerprint": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"is_online": {
|
||
"type": "boolean"
|
||
},
|
||
"is_online_display": {
|
||
"type": "string"
|
||
},
|
||
"last_heartbeat": {
|
||
"type": "string"
|
||
},
|
||
"last_online_ip": {
|
||
"type": "string"
|
||
},
|
||
"license_key": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
},
|
||
"usage_data": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
},
|
||
"models.LicenseCreateRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"authorization_code_id",
|
||
"hardware_fingerprint"
|
||
],
|
||
"properties": {
|
||
"activation_ip": {
|
||
"description": "激活IP,可选",
|
||
"type": "string"
|
||
},
|
||
"authorization_code_id": {
|
||
"description": "授权码ID,必填",
|
||
"type": "string"
|
||
},
|
||
"device_info": {
|
||
"description": "设备信息,可选",
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"hardware_fingerprint": {
|
||
"description": "硬件指纹,必填",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.LicenseDetailResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"activated_at": {
|
||
"description": "激活时间",
|
||
"type": "string"
|
||
},
|
||
"activation_ip": {
|
||
"description": "激活IP",
|
||
"type": "string"
|
||
},
|
||
"authorization_code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"authorization_code_id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
},
|
||
"config_updated_at": {
|
||
"description": "客户端配置更新时间",
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"description": "创建时间",
|
||
"type": "string"
|
||
},
|
||
"customer_id": {
|
||
"description": "客户ID",
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称",
|
||
"type": "string"
|
||
},
|
||
"device_info": {
|
||
"description": "设备信息",
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
},
|
||
"hardware_fingerprint": {
|
||
"description": "硬件指纹",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "许可证ID",
|
||
"type": "string"
|
||
},
|
||
"is_online": {
|
||
"description": "是否在线",
|
||
"type": "boolean"
|
||
},
|
||
"is_online_display": {
|
||
"description": "在线状态显示名称",
|
||
"type": "string"
|
||
},
|
||
"last_heartbeat": {
|
||
"description": "最后心跳时间",
|
||
"type": "string"
|
||
},
|
||
"last_online_ip": {
|
||
"description": "最后在线IP",
|
||
"type": "string"
|
||
},
|
||
"license_key": {
|
||
"description": "许可证密钥",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "许可证状态",
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"description": "状态显示名称",
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"description": "更新时间",
|
||
"type": "string"
|
||
},
|
||
"usage_data": {
|
||
"description": "使用数据",
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
},
|
||
"models.LicenseListItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"activated_at": {
|
||
"description": "激活时间",
|
||
"type": "string"
|
||
},
|
||
"activation_ip": {
|
||
"description": "激活IP",
|
||
"type": "string"
|
||
},
|
||
"authorization_code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"authorization_code_id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称",
|
||
"type": "string"
|
||
},
|
||
"hardware_fingerprint": {
|
||
"description": "硬件指纹",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "许可证ID",
|
||
"type": "string"
|
||
},
|
||
"is_online": {
|
||
"description": "是否在线",
|
||
"type": "boolean"
|
||
},
|
||
"is_online_display": {
|
||
"description": "在线状态显示名称",
|
||
"type": "string"
|
||
},
|
||
"last_heartbeat": {
|
||
"description": "最后心跳时间",
|
||
"type": "string"
|
||
},
|
||
"last_online_ip": {
|
||
"description": "最后在线IP",
|
||
"type": "string"
|
||
},
|
||
"license_key": {
|
||
"description": "许可证密钥",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "许可证状态",
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"description": "状态显示名称",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.LicenseListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"list": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.LicenseListItem"
|
||
}
|
||
},
|
||
"page": {
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"total_pages": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.LicenseRevokeRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"reason": {
|
||
"description": "撤销原因,可选",
|
||
"type": "string",
|
||
"maxLength": 500
|
||
}
|
||
}
|
||
},
|
||
"models.LoginRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"password",
|
||
"username"
|
||
],
|
||
"properties": {
|
||
"password": {
|
||
"description": "密码",
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"description": "用户名",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.LoginResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "响应代码",
|
||
"type": "string"
|
||
},
|
||
"data": {
|
||
"description": "响应数据"
|
||
},
|
||
"message": {
|
||
"description": "响应消息",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.OrderSummaryResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"paid_orders": {
|
||
"description": "已支付订单数",
|
||
"type": "integer"
|
||
},
|
||
"pending_orders": {
|
||
"description": "待支付订单数",
|
||
"type": "integer"
|
||
},
|
||
"total_orders": {
|
||
"description": "订单总数",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.PaymentBusinessOrder": {
|
||
"type": "object",
|
||
"properties": {
|
||
"authorization_code": {
|
||
"type": "string"
|
||
},
|
||
"order_no": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.PaymentListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"page": {
|
||
"type": "integer"
|
||
},
|
||
"page_size": {
|
||
"type": "integer"
|
||
},
|
||
"payments": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/models.PaymentResponse"
|
||
}
|
||
},
|
||
"total_count": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.PaymentResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"amount": {
|
||
"type": "number"
|
||
},
|
||
"business_id": {
|
||
"type": "string"
|
||
},
|
||
"business_type": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"cu_user_id": {
|
||
"type": "string"
|
||
},
|
||
"currency": {
|
||
"type": "string"
|
||
},
|
||
"customer_id": {
|
||
"type": "string"
|
||
},
|
||
"expire_time": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"payment_method": {
|
||
"type": "string"
|
||
},
|
||
"payment_no": {
|
||
"type": "string"
|
||
},
|
||
"payment_provider": {
|
||
"type": "string"
|
||
},
|
||
"payment_time": {
|
||
"type": "string"
|
||
},
|
||
"payment_url": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"trade_no": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.PaymentStatusResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"amount": {
|
||
"type": "number"
|
||
},
|
||
"business_order": {
|
||
"$ref": "#/definitions/models.PaymentBusinessOrder"
|
||
},
|
||
"payment_no": {
|
||
"type": "string"
|
||
},
|
||
"payment_time": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"trade_no": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ProductActivationCodeRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"authorization_code"
|
||
],
|
||
"properties": {
|
||
"authorization_code": {
|
||
"description": "授权码(旧规则格式)",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.ProductActivationCodeResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"product_activation_code": {
|
||
"description": "产品激活码:{授权码}\u0026{payload}",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.RecentAuthorization": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"description": "授权码",
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"description": "创建时间",
|
||
"type": "string"
|
||
},
|
||
"current_activations": {
|
||
"description": "当前激活数量",
|
||
"type": "integer"
|
||
},
|
||
"customer_id": {
|
||
"description": "客户ID",
|
||
"type": "string"
|
||
},
|
||
"customer_name": {
|
||
"description": "客户名称",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"description": "授权描述",
|
||
"type": "string"
|
||
},
|
||
"end_date": {
|
||
"description": "到期时间",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "授权码ID",
|
||
"type": "string"
|
||
},
|
||
"max_activations": {
|
||
"description": "最大激活数量",
|
||
"type": "integer"
|
||
},
|
||
"start_date": {
|
||
"description": "生效时间",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "状态 (normal/locked/expired)",
|
||
"type": "string"
|
||
},
|
||
"status_display": {
|
||
"description": "状态显示文本(多语言)",
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"description": "更新时间",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.StatsOverviewResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"abnormal_alerts": {
|
||
"description": "异常告警数量(活跃许可证中心跳超时的数量,超过配置的心跳超时时间未收到心跳)",
|
||
"type": "integer"
|
||
},
|
||
"active_licenses": {
|
||
"description": "活跃许可证数量(状态为active的许可证总数)",
|
||
"type": "integer"
|
||
},
|
||
"expiring_soon": {
|
||
"description": "即将过期数量(30天内即将过期的授权码,且未被锁定)",
|
||
"type": "integer"
|
||
},
|
||
"growth_rate": {
|
||
"description": "增长率(同比上月)",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/models.GrowthRate"
|
||
}
|
||
]
|
||
},
|
||
"total_auth_codes": {
|
||
"description": "总授权码数量(所有授权码的累计总数)",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.SystemInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"arch": {
|
||
"type": "string"
|
||
},
|
||
"num_cpu": {
|
||
"type": "integer"
|
||
},
|
||
"num_goroutine": {
|
||
"type": "integer"
|
||
},
|
||
"os": {
|
||
"type": "string"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.TrendData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"date": {
|
||
"description": "日期 (YYYY-MM-DD)",
|
||
"type": "string"
|
||
},
|
||
"expired_authorizations": {
|
||
"description": "当日过期授权数",
|
||
"type": "integer"
|
||
},
|
||
"new_authorizations": {
|
||
"description": "当日新增授权数",
|
||
"type": "integer"
|
||
},
|
||
"total_authorizations": {
|
||
"description": "当日授权总数",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"models.TrendPeriod": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description_display": {
|
||
"description": "多语言描述",
|
||
"type": "string"
|
||
},
|
||
"end_date": {
|
||
"description": "结束日期",
|
||
"type": "string"
|
||
},
|
||
"start_date": {
|
||
"description": "开始日期",
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "时间类型",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"models.TrendSummary": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expired_count": {
|
||
"description": "期间过期授权数",
|
||
"type": "integer"
|
||
},
|
||
"growth_rate": {
|
||
"description": "增长率(百分比)",
|
||
"type": "number"
|
||
},
|
||
"new_count": {
|
||
"description": "期间新增授权数",
|
||
"type": "integer"
|
||
},
|
||
"total_count": {
|
||
"description": "期间总授权数",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"securityDefinitions": {
|
||
"BearerAuth": {
|
||
"description": "Bearer token for authentication",
|
||
"type": "apiKey",
|
||
"name": "Authorization",
|
||
"in": "header"
|
||
}
|
||
}
|
||
}`
|
||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||
var SwaggerInfo = &swag.Spec{
|
||
Version: "1.0",
|
||
Host: "",
|
||
BasePath: "/",
|
||
Schemes: []string{"http", "https"},
|
||
Title: "License Manager API",
|
||
Description: "软件授权管理平台API文档",
|
||
InfoInstanceName: "swagger",
|
||
SwaggerTemplate: docTemplate,
|
||
}
|
||
|
||
func init() {
|
||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||
}
|