Files
license-manager/backend/docs/swagger/docs.go
T

2137 lines
72 KiB
Go

// Package swagger 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": "[email protected]"
},
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/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"
}
},
"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/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}/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/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"
}
}
}
}
},
"/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.AuthorizationCode": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"created_at": {
"type": "string"
},
"created_by": {
"type": "string"
},
"current_activations": {
"type": "integer"
},
"custom_parameters": {
"type": "object"
},
"customer_id": {
"type": "string"
},
"customer_name": {
"type": "string"
},
"customer_name_display": {
"type": "string"
},
"deployment_type": {
"type": "string"
},
"deployment_type_display": {
"type": "string"
},
"description": {
"type": "string"
},
"encryption_type": {
"type": "string"
},
"encryption_type_display": {
"type": "string"
},
"end_date": {
"type": "string"
},
"feature_config": {
"type": "object"
},
"id": {
"type": "string"
},
"is_locked": {
"type": "boolean"
},
"lock_reason": {
"type": "string"
},
"locked_at": {
"type": "string"
},
"locked_by": {
"type": "string"
},
"max_activations": {
"type": "integer"
},
"software_id": {
"type": "string"
},
"software_version": {
"type": "string"
},
"start_date": {
"type": "string"
},
"status": {
"type": "string"
},
"status_display": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"usage_limits": {
"type": "object"
}
}
},
"models.AuthorizationCodeCreateRequest": {
"type": "object",
"required": [
"customer_id",
"deployment_type",
"max_activations",
"validity_days"
],
"properties": {
"custom_parameters": {},
"customer_id": {
"type": "string"
},
"deployment_type": {
"type": "string",
"enum": [
"standalone",
"cloud",
"hybrid"
]
},
"description": {
"type": "string",
"maxLength": 1000
},
"encryption_type": {
"type": "string",
"enum": [
"standard",
"advanced"
]
},
"feature_config": {},
"max_activations": {
"type": "integer",
"minimum": 1
},
"software_id": {
"type": "string"
},
"software_version": {
"type": "string"
},
"usage_limits": {},
"validity_days": {
"type": "integer",
"maximum": 36500,
"minimum": 1
}
}
},
"models.AuthorizationCodeCreateResponse": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"models.AuthorizationCodeListItem": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"created_at": {
"type": "string"
},
"current_activations": {
"type": "integer"
},
"customer_id": {
"type": "string"
},
"customer_name": {
"type": "string"
},
"customer_name_display": {
"type": "string"
},
"deployment_type": {
"type": "string"
},
"deployment_type_display": {
"type": "string"
},
"description": {
"type": "string"
},
"end_date": {
"type": "string"
},
"id": {
"type": "string"
},
"is_locked": {
"type": "boolean"
},
"max_activations": {
"type": "integer"
},
"start_date": {
"type": "string"
},
"status": {
"type": "string"
},
"status_display": {
"type": "string"
}
}
},
"models.AuthorizationCodeListResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/models.AuthorizationCodeListItem"
}
},
"page": {
"type": "integer"
},
"page_size": {
"type": "integer"
},
"total": {
"type": "integer"
},
"total_pages": {
"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.AuthorizationCodeUpdateRequest": {
"type": "object",
"required": [
"change_type"
],
"properties": {
"change_type": {
"type": "string",
"enum": [
"renewal",
"upgrade",
"limit_change",
"feature_toggle",
"lock",
"unlock",
"other"
]
},
"custom_parameters": {},
"deployment_type": {
"type": "string",
"enum": [
"standalone",
"cloud",
"hybrid"
]
},
"description": {
"type": "string",
"maxLength": 1000
},
"encryption_type": {
"type": "string",
"enum": [
"standard",
"advanced"
]
},
"feature_config": {},
"max_activations": {
"type": "integer",
"minimum": 1
},
"reason": {
"type": "string",
"maxLength": 500
},
"software_id": {
"type": "string"
},
"software_version": {
"type": "string"
},
"usage_limits": {},
"validity_days": {
"type": "integer",
"maximum": 36500,
"minimum": 1
}
}
},
"models.Customer": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"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",
"enum": [
"small",
"medium",
"large",
"enterprise"
]
},
"contact_person": {
"description": "联系人姓名,必填",
"type": "string",
"maxLength": 100
},
"contact_title": {
"description": "联系人职位,可选",
"type": "string",
"maxLength": 100
},
"customer_level": {
"description": "客户等级,必填",
"type": "string",
"enum": [
"normal",
"vip",
"enterprise",
"strategic"
]
},
"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.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",
"enum": [
"small",
"medium",
"large",
"enterprise"
]
},
"contact_person": {
"description": "联系人姓名,可选",
"type": "string",
"maxLength": 100
},
"contact_title": {
"description": "联系人职位,可选",
"type": "string",
"maxLength": 100
},
"customer_level": {
"description": "客户等级,可选",
"type": "string",
"enum": [
"normal",
"vip",
"enterprise",
"strategic"
]
},
"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.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.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.LoginRequest": {
"type": "object",
"required": [
"password",
"username"
],
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"models.LoginResponse": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"data": {},
"message": {
"type": "string"
}
}
},
"models.SystemInfo": {
"type": "object",
"properties": {
"arch": {
"type": "string"
},
"num_cpu": {
"type": "integer"
},
"num_goroutine": {
"type": "integer"
},
"os": {
"type": "string"
},
"version": {
"type": "string"
}
}
}
},
"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,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}