From d72a4f804eac3134459f98b01798da99446f1d43 Mon Sep 17 00:00:00 2001 From: 2256907009 <2256907009@qq.com> Date: Mon, 20 Apr 2026 11:32:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=B3=E4=BE=A7=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=A0=8F=E6=B7=BB=E5=8A=A0=E5=B7=B2=E8=B4=AD=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin/product.js | 9 + src/api/admin/user.js | 4 - src/views/user/UserBalance.vue | 2 +- src/views/user/UserDetail.vue | 92 +- 默认模块.openapi.json | 25906 ++++++++++++++++++++++++++++++- 5 files changed, 26006 insertions(+), 7 deletions(-) diff --git a/src/api/admin/product.js b/src/api/admin/product.js index 7e41745..08676cc 100644 --- a/src/api/admin/product.js +++ b/src/api/admin/product.js @@ -244,4 +244,13 @@ export const updateProductGroupTag = (data) => { /**删除商品分组标签 */ export const deleteProductGroupTag = (params) => { return http2.delete('/api/v1/admin/good/group_tag/delete', {params: params}) +} + + +/**---------------------------------- */ +/**已购商品管理 */ + +/**获取用户已购商品列表 */ +export const getUserGoodsList = (params) => { + return http2.get('/api/v1/admin/good/user_goods/list', {params: params}) } \ No newline at end of file diff --git a/src/api/admin/user.js b/src/api/admin/user.js index 9661378..ccc935c 100644 --- a/src/api/admin/user.js +++ b/src/api/admin/user.js @@ -18,10 +18,6 @@ export const addUserConsumption = (data) => { }) } -/**查询用户余额 */ -export const getUserBalance = (data) => { - return http2.get('/api/v1/admin/user/balance/select?user_id='+data.user_id) -} /**获取用户余额记录 */ export const getUserBalanceRecord = (data) => { diff --git a/src/views/user/UserBalance.vue b/src/views/user/UserBalance.vue index b9dddd9..46c3681 100644 --- a/src/views/user/UserBalance.vue +++ b/src/views/user/UserBalance.vue @@ -205,7 +205,7 @@ import { ref, reactive, onMounted, computed, watch } from 'vue' import { useRoute } from 'vue-router' import { ElMessage } from 'element-plus' import { Refresh } from '@element-plus/icons-vue' -import { getUserBalance, getUserBalanceRecord, editUserBalance, addUserConsumption, getUserBalanceCount, getUserList, refundBalance } from '@/api/admin/user' +import { getUserBalanceRecord, editUserBalance, addUserConsumption, getUserBalanceCount, getUserList, refundBalance } from '@/api/admin/user' const route = useRoute() diff --git a/src/views/user/UserDetail.vue b/src/views/user/UserDetail.vue index 1af50b6..8b620a0 100644 --- a/src/views/user/UserDetail.vue +++ b/src/views/user/UserDetail.vue @@ -98,7 +98,7 @@ {{ userInfo.Phone || '-' }} {{ userInfo.Email || '-' }} - {{ userInfo.Sex || '-' }} + {{ formatSex(userInfo.Sex) || '-' }} {{ userInfo.Age || '-' }} {{ formatDate(userInfo.UpdatedAt) }} @@ -244,6 +244,38 @@ + + + + + + + + + + + + + + + + +
+ +
+ +
@@ -498,6 +530,7 @@ import { import { getAdminGroupList } from '@/api/admin/group' import { getOrderList } from '@/api/admin/order' import { getTickerList } from '@/api/ticket' +import { getUserGoodsList } from '@/api/admin/product' const Edit = EditIcon const route = useRoute() @@ -542,6 +575,13 @@ const ticketListTotal = ref(0) const ticketListPage = ref(1) const ticketListPageSize = ref(10) +// 已购商品列表相关 +const userGoodsList = ref([]) +const goodsListLoading = ref(false) +const goodsListTotal = ref(0) +const goodsListPage = ref(1) +const goodsListPageSize = ref(10) + // 用户余额相关 const userBalance = ref({ balance: 0, @@ -664,9 +704,21 @@ const handleTabClick = (tab) => { fetchUserOrderList() } else if (tab.props.name === '4') { fetchUserTicketList() + } else if (tab.props.name === '5') { + fetchUserGoodsList() } }; +// 格式化性别 +const formatSex = (sex) => { + if (sex === true) { + return '男' + } else if (sex === false) { + return '女' + } else { + return '-' + } +} // 获取用户信息 const fetchUserInfo = async () => { const userId = route.query.user_id @@ -1019,6 +1071,38 @@ const handleTicketListPageChange = (page) => { fetchUserTicketList() } +// 获取用户已购商品列表 +const fetchUserGoodsList = async () => { + if (!route.query.user_id) return + goodsListLoading.value = true + try { + const res = await getUserGoodsList({ + user_id: route.query.user_id, + page: goodsListPage.value, + count: goodsListPageSize.value + }) + if (res.data.code === 200) { + userGoodsList.value = res.data.data.data || res.data.data.list || [] + goodsListTotal.value = res.data.data.all_count || res.data.data.total || 0 + } + } catch (error) { + ElMessage.error('获取已购商品列表失败') + } finally { + goodsListLoading.value = false + } +} + +const handleGoodsListSizeChange = (size) => { + goodsListPageSize.value = size + goodsListPage.value = 1 + fetchUserGoodsList() +} + +const handleGoodsListPageChange = (page) => { + goodsListPage.value = page + fetchUserGoodsList() +} + // 获取用户余额信息 const fetchUserBalance = async () => { if (!route.query.user_id) return @@ -1337,6 +1421,7 @@ const loadUserData = async () => { await fetchOperationHistory(); await fetchUserOrderList(); await fetchUserTicketList(); + await fetchUserGoodsList(); } // 初始化 @@ -1537,6 +1622,11 @@ onActivated(() => { color: #303133; } +.right-column { + overflow: hidden; + min-width: 0; +} + .tabs-card { border-radius: 12px; border: none; diff --git a/默认模块.openapi.json b/默认模块.openapi.json index 07b6b3d..10d90e9 100644 --- a/默认模块.openapi.json +++ b/默认模块.openapi.json @@ -6,6 +6,156 @@ "version": "1.0.0" }, "tags": [ + { + "name": "Admin.Order" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务管理" + }, + { + "name": "KvmService" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/宿主机组映射管理" + }, + { + "name": "KvmServiceHostGroup" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理" + }, + { + "name": "Point.HostGroup" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理" + }, + { + "name": "Point.Host" + }, + { + "name": "宿主机Token注册" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理" + }, + { + "name": "Point.Image" + }, + { + "name": "镜像管理" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理" + }, + { + "name": "Point.Network" + }, + { + "name": "admin-KVM服务-网络" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理" + }, + { + "name": "Point.Volume" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理" + }, + { + "name": "Point.VM" + }, + { + "name": "KVM-VM" + }, + { + "name": "虚拟机数据迁移" + }, + { + "name": "数据迁移管理" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理" + }, + { + "name": "Point.PostGroup" + }, + { + "name": "安全组" + }, + { + "name": "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理" + }, + { + "name": "Point.VNC" + }, + { + "name": "快照" + }, + { + "name": "管理员-快照" + }, + { + "name": "备份" + }, + { + "name": "管理员-备份" + }, + { + "name": "KVM-UserNetworking" + }, + { + "name": "KVM Task" + }, + { + "name": "指标历史" + }, + { + "name": "VNC指令管理" + }, + { + "name": "UserVm-Volume" + }, + { + "name": "UserVm-Snapshot" + }, + { + "name": "UserVm-Backup" + }, + { + "name": "UserVm-PostGroup" + }, + { + "name": "admin-用户虚拟机-安全组" + }, + { + "name": "UserVm-Network" + }, + { + "name": "Admin.UserVm.Network" + }, + { + "name": "UserVm-Networking" + }, + { + "name": "admin-用户虚拟机-组网" + }, + { + "name": "UserVm" + }, + { + "name": "admin-用户虚拟机" + }, + { + "name": "Admin.UserVm" + }, + { + "name": "UserGoods" + }, + { + "name": "Admin.UserGoods.ExpireRemind" + }, { "name": "后台菜单权限管理" }, @@ -14,6 +164,25519 @@ } ], "paths": { + "/api/v1/admin/user/balance/update": { + "post": { + "summary": "修改用户余额", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "balance_type": { + "description": "余额类型 \ncloud_coin 云币 \ncloud_diamond 云钻 \ncloud_points 云点", + "example": "", + "type": "string" + }, + "price": { + "description": "金额", + "example": "", + "type": "string" + }, + "state": { + "description": "add 增加 \nsub 减少", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/balance/add_history": { + "post": { + "summary": "添加用户消费记录", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "balance_type": { + "description": "余额类型 \ncloud_coin 云币 \ncloud_diamond 云钻 \ncloud_points 云点", + "example": "", + "type": "string" + }, + "apply_balance": { + "description": "是否执行到对应余额", + "example": "", + "type": "boolean" + }, + "price": { + "description": "余额数量", + "example": "", + "type": "string" + }, + "state": { + "description": "add 增加 sub 减少", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + } + }, + "required": [ + "apply_balance" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/balance/get": { + "get": { + "summary": "获取用户余额", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/balance/history": { + "get": { + "summary": "获取用户余额记录", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "balance_type", + "in": "query", + "description": "余额类型 withdraw/云点 general/云币 entity/云钻", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "increase", + "in": "query", + "description": "筛选类型是否为增加", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/balance/refund": { + "get": { + "summary": "退款对应账单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "history_id": { + "type": "integer", + "description": "余额记录id", + "example": 0 + }, + "order_id": { + "type": "integer", + "description": "订单id", + "example": 0 + }, + "bandwidth": { + "type": "boolean", + "description": "是否将退款金额提现(如果为false则会将退款金额添加到对应余额)", + "example": "" + } + }, + "required": [ + "history_id", + "order_id", + "bandwidth" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/detail": { + "get": { + "summary": "获取用户信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/list": { + "get": { + "summary": "获取用户列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/update": { + "post": { + "summary": "更新用户信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "sex": { + "description": "性别 true 男 false 女", + "example": "", + "type": "string" + }, + "age": { + "description": "年龄", + "example": "", + "type": "string" + }, + "cover_id": { + "description": "头像id", + "example": "", + "type": "string" + }, + "user_name": { + "description": "用户名", + "example": "", + "type": "string" + }, + "recommend_id": { + "description": "推介用户id", + "example": "", + "type": "string" + }, + "phone": { + "description": "手机号码", + "example": "", + "type": "string" + }, + "email": { + "description": "邮箱", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/delete": { + "delete": { + "summary": "删除用户", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/update_real_name": { + "post": { + "summary": "修改用户实名信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "name": { + "description": "姓名", + "example": "", + "type": "string" + }, + "id_card": { + "description": "身份证", + "example": "", + "type": "string" + }, + "type": { + "description": "实名类型\n 0:个人认证 1:企业认证", + "example": 0, + "type": "integer" + }, + "status": { + "description": "状态\n0:未认证 1:已认证 2:认证中 3:认证失败", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/update_cover": { + "post": { + "summary": "修改用户头像", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "cover_id": { + "description": "头像id", + "example": "", + "type": "string" + }, + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/update_password": { + "post": { + "summary": "修改用户密码", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "description": "密码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/update_group": { + "post": { + "summary": "修改用户组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "user_group_id": { + "description": "用户组id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/user2admin": { + "post": { + "summary": "修改用户管理员权限", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "admin_group_id": { + "description": "管理员组id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/login_history": { + "get": { + "summary": "获取用户登录记录", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/manage_history": { + "get": { + "summary": "获取用户操作记录", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/simulation_login": { + "get": { + "summary": "模拟用户登录", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user/user/create": { + "post": { + "summary": "新建用户", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "username": { + "description": "用户名", + "example": "", + "type": "string" + }, + "password": { + "description": "密码", + "example": "", + "type": "string" + }, + "phone": { + "description": "手机号码", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/discount/list": { + "get": { + "summary": "获取用户组优惠信息列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_group_id", + "in": "query", + "description": "用户组id 筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "good_id", + "in": "query", + "description": "商品id 筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "good_group_id", + "in": "query", + "description": "商品组id 筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/detail": { + "get": { + "summary": "获取用户组详细信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "group_id", + "in": "query", + "description": "组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/add": { + "post": { + "summary": "添加用户组优惠", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_group_id": { + "description": "用户组id", + "example": 0, + "type": "integer" + }, + "good_id": { + "description": "商品id", + "example": 0, + "type": "integer" + }, + "good_group_id": { + "description": "商品组di", + "example": [ + "", + "" + ], + "type": "integer" + }, + "amount": { + "description": "优惠金额", + "example": 0, + "type": "integer" + }, + "percentage": { + "description": "优惠百分比", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/update": { + "post": { + "summary": "更新用户组信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "group_id": { + "description": "组id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "auth": { + "description": "权限", + "example": "", + "type": "string" + }, + "higher_level_id": { + "description": "下一级用户组id", + "example": 0, + "type": "integer" + }, + "floor_price": { + "description": "升级所需消费金额", + "example": 0, + "type": "integer" + }, + "fixed": { + "description": "是否为固定用户组(不可升级)", + "example": "", + "type": "boolean" + } + }, + "required": [ + "group_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/delete": { + "delete": { + "summary": "删除用户组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "group_id", + "in": "query", + "description": "组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": {} + }, + "examples": {} + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/list": { + "get": { + "summary": "获取用户组列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/member_list": { + "get": { + "summary": "获取用户组成员列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "group_id", + "in": "query", + "description": "组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/user_group/create": { + "post": { + "summary": "新建用户组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "auth": { + "description": "权限", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "higher_level_id": { + "description": "下一级用户组id", + "example": 0, + "type": "integer" + }, + "floor_price": { + "description": "升级所需消费金额", + "example": 0, + "type": "integer" + }, + "fixed": { + "description": "是否为固定用户组(不可升级)", + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/web_routs/add": { + "post": { + "summary": "新增前端路由", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "MenuName": { + "description": "菜单名称", + "example": "", + "type": "string" + }, + "ParentId": { + "description": "父级id", + "example": "", + "type": "string" + }, + "MenuType": { + "description": "菜单类型", + "example": "", + "type": "string" + }, + "Path": { + "description": "菜单路径", + "example": "", + "type": "string" + }, + "Name": { + "description": "菜单名称", + "example": "", + "type": "string" + }, + "Component": { + "description": "组件路径", + "example": "", + "type": "string" + }, + "Icon": { + "description": "菜单图标", + "example": "", + "type": "string" + }, + "IsHide": { + "description": "是否隐藏", + "example": "", + "type": "string" + }, + "IsLink": { + "description": "是否外链", + "example": "", + "type": "string" + }, + "IsKeepAlive": { + "description": "是否缓存", + "example": "", + "type": "string" + }, + "IsFull": { + "description": "是否全屏", + "example": "", + "type": "string" + }, + "IsAffix": { + "description": "是否固定", + "example": "", + "type": "string" + }, + "Redirect": { + "description": "重定向地址", + "example": "", + "type": "string" + }, + "HasChildren": { + "description": "是否有子菜单", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/web_routs/update": { + "post": { + "summary": "更新前端路由", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "路由ID", + "example": "", + "type": "string" + }, + "MenuName": { + "description": "菜单名称", + "example": "", + "type": "string" + }, + "ParentId": { + "description": "父级id", + "example": "", + "type": "string" + }, + "MenuType": { + "description": "菜单类型", + "example": "", + "type": "string" + }, + "Path": { + "description": "菜单路径", + "example": "", + "type": "string" + }, + "Name": { + "description": "菜单名称", + "example": "", + "type": "string" + }, + "Component": { + "description": "组件路径", + "example": "", + "type": "string" + }, + "Icon": { + "description": "菜单图标", + "example": "", + "type": "string" + }, + "IsHide": { + "description": "是否隐藏", + "example": "", + "type": "string" + }, + "IsLink": { + "description": "是否外链", + "example": "", + "type": "string" + }, + "IsKeepAlive": { + "description": "是否缓存", + "example": "", + "type": "string" + }, + "IsFull": { + "description": "是否全屏", + "example": "", + "type": "string" + }, + "IsAffix": { + "description": "是否固定", + "example": "", + "type": "string" + }, + "Redirect": { + "description": "重定向地址", + "example": "", + "type": "string" + }, + "HasChildren": { + "description": "是否有子菜单", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/list": { + "get": { + "summary": "获取工单列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID(用于获取指定用户的工单列表)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "状态", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "type", + "in": "query", + "description": "类型id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "orderBy", + "in": "query", + "description": "根据什么字段排序", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "description": "排序方式 asc \\ desc", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键字筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/count": { + "get": { + "summary": "获取工单数量", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [ + { + "bearer": [] + } + ] + } + }, + "/api/v1/admin/work_order/detail": { + "get": { + "summary": "获取工单详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "work_id", + "in": "query", + "description": "工单id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/reply": { + "post": { + "summary": "回复工单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "content": { + "description": "内容", + "example": "", + "type": "string" + }, + "files": { + "description": "文件列表", + "example": "", + "type": "string" + }, + "work_id": { + "description": "工单id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/close": { + "post": { + "summary": "关闭工单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "work_id": { + "description": "工单id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/update": { + "post": { + "summary": "修改工单信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "Name": { + "description": "工单名称", + "example": "", + "type": "string" + }, + "Table": { + "description": "工单所属产品表", + "example": "", + "type": "string" + }, + "UserId": { + "description": "工单所属用户", + "example": "", + "type": "string" + }, + "Status": { + "description": "工单状态", + "example": "", + "type": "string" + }, + "OrderId": { + "description": "工单所属订单id", + "example": "", + "type": "string" + }, + "Type": { + "description": "工单类型", + "example": "", + "type": "string" + }, + "work_id": { + "description": "工单id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/add_type": { + "post": { + "summary": "添加工单类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "icoId": { + "type": "integer", + "description": "图标文件id ", + "example": 0 + } + }, + "required": [ + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/update_type": { + "post": { + "summary": "修改工单类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "icoId": { + "type": "integer", + "description": "图标文件id ", + "example": 0 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/type_list": { + "get": { + "summary": "获取工单类型列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/delete_type": { + "delete": { + "summary": "删除工单类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/work_order/update_reply": { + "post": { + "summary": "修改工单回复信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "回复内容id", + "example": "", + "type": "string" + }, + "content": { + "description": "内容", + "example": "", + "type": "string" + }, + "flies": { + "description": "文件列表", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/signin/add_reward": { + "post": { + "summary": "新增签到奖励", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "points": { + "description": "积分", + "example": "", + "type": "string" + }, + "reward_type_ids": { + "description": "额外奖励列表 <奖励id:数量,奖励id:数量...>", + "example": "", + "type": "string" + }, + "sign_time": { + "description": "签到奖励所属日期", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/signin/add_reward_type": { + "post": { + "summary": "新增签到奖励类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "tag": { + "description": "标签", + "example": "", + "type": "string" + }, + "become_time": { + "type": "integer", + "description": "奖励到期时间(时间戳)", + "example": 0 + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/list": { + "get": { + "summary": "获取拼团活动类型列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "expire_time", + "in": "query", + "description": "过期时间筛选 时间戳", + "required": false, + "example": 0, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "标签筛选", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/tags": { + "get": { + "summary": "获取拼团活动类型tag列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/add": { + "post": { + "summary": "新增拼团活动类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "price": { + "description": "价格 /分", + "example": "", + "type": "string" + }, + "renew_price": { + "description": "续费价格 /分", + "example": "", + "type": "string" + }, + "max_person": { + "description": "拼团需要人数", + "example": "", + "type": "string" + }, + "tag": { + "description": "标签", + "example": "", + "type": "string" + }, + "expire_time": { + "description": "活动过期时间", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/update": { + "post": { + "summary": "修改拼团活动类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "price": { + "description": "价格 /分", + "example": "", + "type": "string" + }, + "renew_price": { + "description": "续费价格 /分", + "example": "", + "type": "string" + }, + "max_person": { + "description": "拼团需要人数", + "example": "", + "type": "string" + }, + "tag": { + "description": "标签", + "example": "", + "type": "string" + }, + "expire_time": { + "description": "活动过期时间", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/type/delete": { + "delete": { + "summary": "删除拼团活动类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/check": { + "get": { + "summary": "检查队伍列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/add_random_user": { + "post": { + "summary": "为队伍添加随机伪人", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "group_buy_id": { + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/add_random_group": { + "post": { + "summary": "创建随机伪人队伍", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "队伍名称", + "example": "", + "type": "string" + }, + "group_buy_type_id": { + "description": "队伍类型id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/export_idc_info": { + "get": { + "summary": "导出成功队伍信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "{{Token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/export_order_info": { + "get": { + "summary": "导出所有成功订单信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/set_order": { + "post": { + "summary": "为指定队伍下发订单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "group_buy_id": { + "description": "队伍id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/remove": { + "delete": { + "summary": "删除指定队伍", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "group_buy_id", + "in": "query", + "description": "队伍id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/clear": { + "delete": { + "summary": "清除所有队伍", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/activity/group_buy/user_clear": { + "delete": { + "summary": "清除指定用户的所有队伍", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/api/goedge/add_server": { + "post": { + "summary": "新增goedge服务器", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "服务器名称", + "example": "", + "type": "string" + }, + "note": { + "description": "服务器介绍", + "example": "", + "type": "string" + }, + "url": { + "description": "服务器url请求地址", + "example": "", + "type": "string" + }, + "access_key_id": { + "example": "", + "type": "string" + }, + "access_key": { + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/api/goedge/get_server_list": { + "get": { + "summary": "获取goedge服务器列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/api/goedge/get_server": { + "get": { + "summary": "获取goedge服务器信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "server_id", + "in": "query", + "description": "服务器id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/api/goedge/update_server": { + "post": { + "summary": "修改goedge服务器信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "server_id": { + "example": "", + "type": "string" + }, + "name": { + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "web_point": { + "example": "", + "type": "string" + }, + "url": { + "example": "", + "type": "string" + }, + "access_key_id": { + "example": "", + "type": "string" + }, + "access_key": { + "example": "", + "type": "string" + }, + "feature_codes": { + "description": " 用户默认功能列表 使用,分割", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/api/goedge/delete_server": { + "delete": { + "summary": "删除goedge服务器", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "server_id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/api/goedge/update_server_open_register": { + "post": { + "summary": "修改goedge服务器是否开放注册", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "server_id": { + "example": "", + "type": "string" + }, + "open_register": { + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/domain_withe/list": { + "get": { + "summary": "获取域名白名单列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key_word", + "in": "query", + "description": "关键字筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/domain_withe/add": { + "post": { + "summary": "添加域名白名单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "domain": { + "description": "域名", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/domain_withe/delete": { + "post": { + "summary": "删除域名白名单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "domain_id": { + "description": "域名id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/path/list": { + "get": { + "summary": "获取权限列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词检索", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/path/add": { + "post": { + "summary": "新增权限信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "path": { + "description": "对应路径\n/api/* 表示 /api/ 开头的下一级路径允许 如 /api/aa/\n/api/** 表示 /api/ 开头的之后所有路径都允许 如 /api/aa/bb/cc ", + "example": "", + "type": "string" + }, + "note": { + "description": "说明", + "example": "", + "type": "string" + } + }, + "required": [ + "name", + "path" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/path/update": { + "post": { + "summary": "修改权限信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "path": { + "description": "路径", + "example": "", + "type": "string" + }, + "note": { + "description": "说明", + "example": "", + "type": "string" + }, + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/path/delete": { + "delete": { + "summary": "删除权限信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/admin/list": { + "get": { + "summary": "获取指定管理员的权限列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "admin_group_id", + "in": "query", + "description": "管理员组id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "owner_type", + "in": "query", + "description": "需要获取的类型 'user','group'\n如果是 user 则填写 user_id\n如果是 group 则填写 admin_group_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/admin/add": { + "post": { + "summary": "新增管理员权限", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": 0, + "type": "integer" + }, + "admin_group_id": { + "description": "管理员组id", + "example": 0, + "type": "integer" + }, + "owner_type": { + "description": "权限的绑定类型 'user','group'\n如果是 user 则填写 user_id\n如果是 group 则填写 admin_group_id", + "example": "", + "type": "string" + }, + "permission_id": { + "description": "权限Id", + "example": 0, + "type": "integer" + }, + "weight": { + "description": "权重 默认 10", + "example": 0, + "type": "integer" + }, + "permission_type": { + "description": "权限类型 (0 none/1 prohibit/2 read/3 write/4 all)", + "example": 0, + "type": "integer" + }, + "expire_at": { + "description": "权限过期时间 不填写则不会过期", + "example": "", + "type": "string" + } + }, + "required": [ + "owner_type", + "permission_id", + "permission_type" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/admin/update": { + "post": { + "summary": "修改管理员权限", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "管理员权限id", + "example": "", + "type": "string" + }, + "user_id": { + "description": "用户ID", + "example": 0, + "type": "integer" + }, + "admin_group_id": { + "description": "管理员组id", + "example": 0, + "type": "integer" + }, + "owner_type": { + "description": "权限的绑定类型 'user','group'\n如果是 user 则填写 user_id\n如果是 group 则填写 admin_group_id", + "example": "", + "type": "string" + }, + "permission_id": { + "description": "路径权限Id", + "example": 0, + "type": "integer" + }, + "weight": { + "description": "权重 默认 10", + "example": 0, + "type": "integer" + }, + "permission_type": { + "description": "权限类型 (0 none/ 1 prohibit/ 2 read/3 write/4 all)", + "example": 0, + "type": "integer" + }, + "expire_at": { + "description": "权限过期时间 不填写则不会过期", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/permission/admin/delete": { + "delete": { + "summary": "删除管理员权限", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/admin_group/list": { + "get": { + "summary": "获取管理员组列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/admin_group/member_list": { + "get": { + "summary": "获取管理组成员列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "in": "query", + "description": "组id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/admin_group/detail": { + "get": { + "summary": "获取管理员组详细信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "group_id", + "in": "query", + "description": "组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/admin_group/create": { + "post": { + "summary": "新建管理员组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/admin_group/update": { + "post": { + "summary": "更新管理员组信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "group_id": { + "description": "ID 编号", + "example": 0, + "type": "integer" + }, + "name": { + "description": "用户名", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + } + }, + "required": [ + "group_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/admin_group/delete": { + "delete": { + "summary": "删除管理员组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "group_id", + "in": "query", + "description": "组id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/file/list": { + "get": { + "summary": "获取文件列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "query", + "description": "筛选用户", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/file/detail": { + "get": { + "summary": "获取文件详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "file_id", + "in": "query", + "description": "文件id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/file/delete": { + "delete": { + "summary": "删除文件", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "file_id", + "in": "query", + "description": "文件id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/file/update": { + "post": { + "summary": "修改文件信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file_id": { + "description": "文件id", + "example": "", + "type": "string" + }, + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "open_dow": { + "description": "是否允许公开访问", + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group/list": { + "get": { + "summary": "获取商品分组列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "disable", + "in": "query", + "description": "筛选 隐藏/显示 的分组", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "level", + "in": "query", + "description": "筛选分组层级", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "parent_id", + "in": "query", + "description": "筛选父级分组id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "筛选分组标签", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group/create": { + "post": { + "summary": "创建商品分组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "disable": { + "description": "是否隐藏", + "example": "", + "type": "boolean" + }, + "level": { + "description": "分组层级", + "example": "", + "type": "string" + }, + "parent_id": { + "description": "父级分组id", + "example": 0, + "type": "integer" + }, + "cover_id": { + "description": "分组封面id", + "example": 0, + "type": "integer" + }, + "tag_id": { + "description": "分组标签id", + "example": 0, + "type": "integer" + }, + "index": { + "description": "分组排序索引", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group/update": { + "post": { + "summary": "更新商品分组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "disable": { + "description": "是否隐藏", + "example": "", + "type": "boolean" + }, + "level": { + "description": "分组层级", + "example": "", + "type": "string" + }, + "parent_id": { + "description": "父级分组id", + "example": 0, + "type": "integer" + }, + "cover_id": { + "description": "分组封面id", + "example": 0, + "type": "integer" + }, + "tag_id": { + "description": "分组标签id", + "example": 0, + "type": "integer" + }, + "index": { + "description": "分组排序索引", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group/disable": { + "post": { + "summary": "隐藏商品组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group/enable": { + "post": { + "summary": "启用商品组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group/delete": { + "delete": { + "summary": "删除商品分组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/goods/list": { + "get": { + "summary": "获取商品列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "good_group_id", + "in": "query", + "description": "筛选商品组id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "tag", + "in": "query", + "description": "商品标签", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/goods/tag_list": { + "get": { + "summary": "获取商品标签列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/goods/create": { + "post": { + "summary": "创建商品", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "table": { + "description": "商品所属表", + "example": "", + "type": "string" + }, + "tag": { + "description": "商品标签,从 tag_list 接口中获取", + "example": "", + "type": "string" + }, + "content": { + "description": "内容", + "example": "", + "type": "string" + }, + "cover_id": { + "description": "封面id", + "example": 0, + "type": "integer" + }, + "inventory_control": { + "description": "是否开启商品库存", + "example": "", + "type": "string" + }, + "inventory": { + "description": "商品库存", + "example": 0, + "type": "integer" + }, + "price": { + "description": "商品价格", + "example": 0, + "type": "integer" + }, + "pay_num": { + "description": "单个商品数量", + "example": 0, + "type": "integer" + }, + "expire_time": { + "description": "商品购买有效期 /天", + "example": 0, + "type": "integer" + }, + "recommend": { + "description": "是否开启推介", + "example": "", + "type": "boolean" + }, + "recommend_rebate": { + "description": "商品推介返还 /100%", + "example": 0, + "type": "integer" + }, + "good_group_id": { + "description": "商品组id", + "example": 0, + "type": "integer" + }, + "arg_type": { + "description": "商品参数类型 all 所有 / plan 套餐 / customize 自定义", + "example": "", + "type": "string" + }, + "can_renew": { + "description": "是否允许续费", + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/goods/update": { + "post": { + "summary": "更新商品", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "table": { + "description": "商品所属表", + "example": "", + "type": "string" + }, + "tag": { + "description": "商品标签,从 tag_list 接口中获取", + "example": "", + "type": "string" + }, + "content": { + "description": "内容", + "example": "", + "type": "string" + }, + "cover_id": { + "description": "封面id", + "example": 0, + "type": "integer" + }, + "inventory_control": { + "description": "是否开启商品库存", + "example": "", + "type": "boolean" + }, + "inventory": { + "description": "商品库存", + "example": 0, + "type": "integer" + }, + "price": { + "description": "商品价格", + "example": 0, + "type": "integer" + }, + "pay_num": { + "description": "单个商品数量", + "example": 0, + "type": "integer" + }, + "expire_time": { + "description": "商品购买有效期 /天", + "example": 0, + "type": "integer" + }, + "recommend": { + "description": "是否开启推介", + "example": "", + "type": "boolean" + }, + "recommend_rebate": { + "description": "商品推介返还 /100%", + "example": 0, + "type": "integer" + }, + "good_group_id": { + "description": "商品组id", + "example": 0, + "type": "integer" + }, + "arg_type": { + "description": "商品参数类型 all 所有 / plan 套餐 / customize 自定义", + "example": "", + "type": "string" + }, + "can_renew": { + "description": "是否允许续费", + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/goods/delete": { + "delete": { + "summary": "删除商品", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/list": { + "get": { + "summary": "获取商品参数列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/create": { + "post": { + "summary": "创建商品参数", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": 0, + "type": "integer" + }, + "arg_name": { + "description": "参数名称", + "example": "", + "type": "string" + }, + "arg_type": { + "description": "参数类型 string | number | select", + "example": "", + "type": "string" + }, + "arg_step": { + "description": "参数值步进值(number 类型参数)", + "example": 0, + "type": "integer" + }, + "arg_max": { + "description": "参数值最大值(number 类型参数)", + "example": 0, + "type": "integer" + }, + "arg_min": { + "description": "参数值最小值(number 类型参数)", + "example": 0, + "type": "integer" + }, + "must": { + "type": "boolean", + "description": "参数是否为必选", + "example": "" + }, + "user_add": { + "description": "购买后是否允许单独追加购买", + "example": "", + "type": "boolean" + }, + "use_user_group_discount": { + "description": "是否允许使用用户组优惠", + "example": "", + "type": "boolean" + }, + "use_user_discount": { + "description": "是否允许使用用户优惠券(代金券与优惠码)", + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/detail": { + "get": { + "summary": "获取商品参数详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "arg_id", + "in": "query", + "description": "参数id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/update": { + "post": { + "summary": "更新商品参数", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "arg_id", + "in": "query", + "description": "参数id", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "arg_name", + "in": "query", + "description": "参数名称", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "arg_type", + "in": "query", + "description": "参数类型 string | number | select", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "arg_step", + "in": "query", + "description": "参数值步进值(number 类型参数)", + "required": false, + "example": 0, + "schema": { + "type": "integer" + } + }, + { + "name": "arg_max", + "in": "query", + "description": "参数值最大值(number 类型参数)", + "required": false, + "example": 0, + "schema": { + "type": "integer" + } + }, + { + "name": "arg_min", + "in": "query", + "description": "参数值最小值(number 类型参数)", + "required": false, + "example": 0, + "schema": { + "type": "integer" + } + }, + { + "name": "must", + "in": "query", + "description": "是否必填(可选,传入时更新)", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "user_add", + "in": "query", + "description": "购买后是否允许单独追加购买(可选,传入时更新)", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "use_user_group_discount", + "in": "query", + "description": "是否允许使用用户组优惠(可选,传入时更新)", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "use_user_discount", + "in": "query", + "description": "是否允许使用用户优惠券(可选,传入时更新)", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/delete": { + "delete": { + "summary": "删除商品参数", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "arg_id", + "in": "query", + "description": "参数id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/add_value": { + "post": { + "summary": "增加商品参数值", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": 0, + "type": "integer" + }, + "arg_id": { + "description": "参数id", + "example": 0, + "type": "integer" + }, + "attr_name": { + "description": "值名称", + "example": "", + "type": "string" + }, + "attr_value": { + "description": "参数值 (select 类型使用)", + "example": "", + "type": "string" + }, + "index": { + "description": "商品参数排序索引", + "example": 0, + "type": "integer" + }, + "attr_range": { + "description": "参数值范围 (number类型使用)", + "example": 0, + "type": "integer" + }, + "range_type": { + "description": "参数值范围类型 after \\ before \\ equal (number类型使用)", + "example": "", + "type": "string" + }, + "attr_price": { + "description": "价格", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/delete_value": { + "delete": { + "summary": "删除商品参数值", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "attr_id", + "in": "query", + "description": "参数值id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/update_value": { + "post": { + "summary": "更新商品参数值", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": 0, + "type": "integer" + }, + "attr_id": { + "description": "参数值id", + "example": "", + "type": "string" + }, + "attr_name": { + "description": "值名称", + "example": "", + "type": "string" + }, + "attr_value": { + "description": "参数值 (select 类型使用)", + "example": "", + "type": "string" + }, + "attr_range": { + "description": "参数值范围 (number类型使用)", + "example": 0, + "type": "integer" + }, + "index": { + "description": "商品参数排序索引", + "example": 0, + "type": "integer" + }, + "range_type": { + "description": "参数值范围类型 after \\ before \\ equal (number类型使用)", + "example": "", + "type": "string" + }, + "attr_price": { + "description": "价格", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/spec/copy": { + "post": { + "summary": "复制商品参数", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "type": "integer", + "description": "源商品(从这个商品中复制)", + "example": 0 + }, + "dest_id": { + "type": "integer", + "description": "目标商品(复制给这个商品)", + "example": 0 + }, + "copy_attrs": { + "type": "boolean", + "description": "是否复制参数都所有属性值", + "example": "" + } + } + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group_tag/list": { + "get": { + "summary": "获取商品分组标签列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group_tag/detail": { + "get": { + "summary": "获取商品分组标签详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group_tag/create": { + "post": { + "summary": "创建商品分组标签", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "index": { + "description": "标签排序索引", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group_tag/update": { + "post": { + "summary": "更新商品分组标签", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID 编号", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "index": { + "description": "标签排序索引", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/group_tag/delete": { + "delete": { + "summary": "删除商品分组标签", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "ID 编号", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/list": { + "get": { + "summary": "获取商品套餐列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/create": { + "post": { + "summary": "创建商品套餐", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "说明", + "example": "", + "type": "string" + }, + "args": { + "description": "参数 json\n{\n\"arg_id\": 参数id,\n\"name\": \"参数名称\",\n\"attr_id\": 参数值id,\n\"value\": \"参数值\"(如果是 select 或 string 类型),\n\"number\": 参数值(如果是 number 类型),\n}", + "example": "", + "type": "string" + }, + "extra_arg_ids": { + "description": "额外参数 示例:1,2,3,4", + "example": "", + "type": "string" + }, + "index": { + "type": "integer", + "description": "套餐排序索引", + "example": 0 + }, + "inventory": { + "type": "integer", + "description": "库存数量", + "example": 0 + }, + "fixed_price": { + "type": "integer", + "description": "套餐固定价格", + "example": 0 + }, + "enable_fixed_price": { + "type": "integer", + "description": "是否启用套餐固定价格", + "example": "" + }, + "show_home": { + "description": "是否显示在首页", + "example": "", + "type": "boolean" + }, + "can_update": { + "description": "是否允许用户升级", + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/detail": { + "get": { + "summary": "获取商品套餐详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "plan_id", + "in": "query", + "description": "套餐id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/update": { + "post": { + "summary": "更新商品套餐", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": "", + "type": "string" + }, + "plan_id": { + "description": "套餐id", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "说明", + "example": "", + "type": "string" + }, + "args": { + "description": "参数 json\n{\n\"arg_id\": 参数id,\n\"name\": \"参数名称\",\n\"attr_id\": 参数值id,\n\"value\": \"参数值\"(如果是 select 或 string 类型),\n\"number\": 参数值(如果是 number 类型),\n}", + "example": "", + "type": "string" + }, + "extra_arg_ids": { + "description": "额外参数 示例:1,2,3,4", + "example": "", + "type": "string" + }, + "index": { + "description": "套餐排序索引", + "example": 0, + "type": "integer" + }, + "disable": { + "type": "boolean", + "description": "是否禁用", + "example": "" + }, + "inventory": { + "type": "integer", + "description": "库存数量", + "example": 0 + }, + "fixed_price": { + "type": "integer", + "description": "套餐固定价格", + "example": 0 + }, + "show_home": { + "description": "是否显示在首页", + "example": "", + "type": "boolean" + }, + "can_update": { + "description": "是否允许用户升级", + "example": "", + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/delete": { + "delete": { + "summary": "删除商品套餐", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "plan_id", + "in": "query", + "description": "套餐id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/disable": { + "post": { + "summary": "禁用商品套餐", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "type": "integer", + "description": "商品id", + "example": 0 + }, + "plan_id": { + "type": "integer", + "description": "套餐id", + "example": 0 + } + } + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/enable": { + "post": { + "summary": "启用商品套餐", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": 0, + "type": "integer" + }, + "plan_id": { + "description": "套餐id", + "example": 0, + "type": "integer" + } + } + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/disable_fixed_price": { + "post": { + "summary": "禁用套餐固定价格", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": "", + "type": "string" + }, + "plan_id": { + "description": "套餐id", + "example": "", + "type": "string" + } + } + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/good/plan/enable_fixed_price": { + "post": { + "summary": "启用套餐固定价格", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "description": "商品id", + "example": "", + "type": "string" + }, + "plan_id": { + "description": "套餐id", + "example": "", + "type": "string" + } + } + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/order/list": { + "get": { + "summary": "获取订单列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "description": "状态筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "query", + "description": "用户id筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_key", + "in": "query", + "description": "用户关键词筛选(用户名 手机号 邮箱)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "error", + "in": "query", + "description": "筛选订单是否存在错误信息。true: 仅返回有错误的订单;false: 仅返回无错误的订单;不传: 不筛选", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/order/detail": { + "get": { + "summary": "获取订单详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "order_id", + "in": "query", + "description": "订单id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/order/create": { + "post": { + "summary": "创建订单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "table": { + "description": "订单所属表", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "price": { + "description": "价格", + "example": 0, + "type": "integer" + }, + "renew_price": { + "description": "续费价格", + "example": 0, + "type": "integer" + }, + "user_id": { + "description": "用户ID", + "example": 0, + "type": "integer" + }, + "commodity_id": { + "description": "订单所属商品id", + "example": 0, + "type": "integer" + }, + "pay_num": { + "description": "购买数量", + "example": 0, + "type": "integer" + }, + "expire_time": { + "description": "过期时间", + "example": 0, + "type": "integer" + }, + "discount_code_id": { + "description": "优惠码id", + "example": 0, + "type": "integer" + }, + "coupon_id": { + "description": "代金券id", + "example": 0, + "type": "integer" + }, + "state": { + "description": "状态 0:未支付 1:已支付 2:已失效", + "example": 0, + "type": "integer" + }, + "pay_type": { + "description": "支付类型", + "example": "", + "type": "string" + }, + "args": { + "description": "订单参数", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/order/update": { + "post": { + "summary": "修改订单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "order_id": { + "description": "订单id", + "example": 0, + "type": "integer" + }, + "table": { + "description": "订单所属表", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "price": { + "description": "价格", + "example": 0, + "type": "integer" + }, + "renew_price": { + "description": "续费价格", + "example": 0, + "type": "integer" + }, + "user_id": { + "description": "用户ID", + "example": 0, + "type": "integer" + }, + "commodity_id": { + "description": "订单所属商品id", + "example": 0, + "type": "integer" + }, + "pay_num": { + "description": "购买数量", + "example": 0, + "type": "integer" + }, + "expire_time": { + "description": "过期时间", + "example": 0, + "type": "integer" + }, + "discount_code_id": { + "description": "优惠码id", + "example": 0, + "type": "integer" + }, + "coupon_id": { + "description": "代金券id", + "example": 0, + "type": "integer" + }, + "state": { + "description": "状态 0:未支付 1:已支付 2:已失效", + "example": 0, + "type": "integer" + }, + "pay_type": { + "description": "支付类型", + "example": "", + "type": "string" + }, + "args": { + "description": "订单参数", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/order/refund": { + "post": { + "summary": "退款订单", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "withdraw": { + "type": "boolean", + "description": "是否提现(不选择提现会增加金额到余额)", + "example": "" + }, + "order_id": { + "description": "订单id", + "example": "", + "type": "string" + } + } + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/order/amount_overview": { + "get": { + "summary": "获取订单金额概览", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "start_at", + "in": "query", + "description": "开始时间", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "end_at", + "in": "query", + "description": "结束时间", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": {} + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/order/retry_hook": { + "post": { + "summary": "重试订单流程", + "deprecated": false, + "description": "对已支付(state=1)的订单重新触发支付成功Hook,仅执行业务逻辑(创建商品/续费/升级等),不会重复发送支付通知。成功后自动清除订单的error字段,失败则更新error字段。", + "operationId": "RetryOrderHook", + "tags": [ + "Admin.Order" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "order_id": { + "type": "integer", + "description": "订单ID", + "example": 0 + } + }, + "required": [ + "order_id" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "重试成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "retry_order_hook_success" + } + } + } + } + }, + "headers": {} + }, + "400": { + "description": "重试失败(订单状态不正确或Hook执行失败)", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/list": { + "get": { + "summary": "获取优惠码列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "discount_type", + "in": "query", + "description": "优惠码 code/代金券 coupon", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/detail": { + "get": { + "summary": "获取优惠码详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "code_id", + "in": "query", + "description": "优惠码id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/history": { + "get": { + "summary": "获取 优惠码\\代金券 使用记录", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "code_id", + "in": "query", + "description": "优惠码\\代金券 id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/create": { + "post": { + "summary": "创建优惠码", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "discount_type": { + "description": "优惠码 code/代金券 coupon", + "example": "", + "type": "string" + }, + "code": { + "description": "优惠码", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "min_amount": { + "description": "订单可使用的最小金额(满 xx 可使用) *100", + "example": 0, + "type": "integer" + }, + "max_amount": { + "description": "订单可抵扣的最大金额 *100", + "example": 0, + "type": "integer" + }, + "amount": { + "description": "优惠金额 (amount 与 percentage 二选一) *100", + "example": 0, + "type": "integer" + }, + "percentage": { + "description": "优惠百分比 (amount 与 percentage 二选一) *100", + "example": 0, + "type": "integer" + }, + "start_time": { + "description": "优惠开始时间", + "example": 0, + "type": "integer" + }, + "end_time": { + "description": "优惠结束时间", + "example": 0, + "type": "integer" + }, + "max_times": { + "description": "优惠最大使用次数", + "example": 0, + "type": "integer" + }, + "user_times": { + "description": "单用户最大使用次数", + "example": 0, + "type": "integer" + }, + "renew": { + "description": "续费是否可用/继承", + "example": "", + "type": "boolean" + }, + "can_stacking": { + "description": "是否可与同类型优惠叠加", + "example": "", + "type": "boolean" + }, + "can_combine": { + "description": "是否可与其他类型优惠叠加", + "example": "", + "type": "boolean" + }, + "duration": { + "description": "代金券有效持续时间 /秒", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/update": { + "post": { + "summary": "更新优惠码", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "discount_type": { + "description": "优惠码 code/代金券 coupon", + "example": "", + "type": "string" + }, + "code": { + "description": "优惠码", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "min_amount": { + "description": "订单可使用的最小金额(满 xx 可使用) *100", + "example": 0, + "type": "integer" + }, + "max_amount": { + "description": "订单可抵扣的最大金额 *100", + "example": 0, + "type": "integer" + }, + "amount": { + "description": "优惠金额 (amount 与 percentage 二选一) *100", + "example": 0, + "type": "integer" + }, + "percentage": { + "description": "优惠百分比 (amount 与 percentage 二选一) *100", + "example": 0, + "type": "integer" + }, + "start_time": { + "description": "优惠开始时间", + "example": 0, + "type": "integer" + }, + "end_time": { + "description": "优惠结束时间", + "example": 0, + "type": "integer" + }, + "max_times": { + "description": "优惠最大使用次数", + "example": 0, + "type": "integer" + }, + "user_times": { + "description": "单用户最大使用次数", + "example": 0, + "type": "integer" + }, + "renew": { + "description": "续费是否可用/继承", + "example": "", + "type": "boolean" + }, + "can_stacking": { + "description": "是否可与同类型优惠叠加", + "example": "", + "type": "boolean" + }, + "can_combine": { + "description": "是否可与其他类型优惠叠加", + "example": "", + "type": "boolean" + }, + "duration": { + "description": "代金券有效持续时间 /秒", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/delete": { + "delete": { + "summary": "删除优惠码", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "code_id", + "in": "query", + "description": "优惠码\\代金券 id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/goods/list": { + "get": { + "summary": "获取 优惠码\\代金券 商品列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "code_id", + "in": "query", + "description": "优惠码\\代金券 id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/goods/add": { + "post": { + "summary": "新增 优惠码\\代金券 商品关联", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code_id": { + "description": "优惠码\\代金券 id", + "example": "", + "type": "string" + }, + "good_ids": { + "description": "商品id列表 , 分割 (与good_group_ids二选一)", + "example": "", + "type": "string" + }, + "good_group_ids": { + "description": "商品组id列表 , 分割(与good_ids二选一)", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/goods/update": { + "post": { + "summary": "修改 优惠码\\代金券 商品关联", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code_id": { + "description": "优惠码\\代金券 id", + "example": "", + "type": "string" + }, + "discount_good_id": { + "description": "关联信息id", + "example": "", + "type": "string" + }, + "good_id": { + "description": "商品id(原商品关联信息如果使用的是 goodId 则只能更新 goodId,goodGroupId 同理)", + "example": "", + "type": "string" + }, + "good_group_id": { + "description": "商品组id(原商品关联信息如果使用的是 goodId 则只能更新 goodId,goodGroupId 同理)", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/goods/delete": { + "delete": { + "summary": "删除 优惠码\\代金券 商品关联", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code_id": { + "description": "优惠码\\代金券 id", + "example": "", + "type": "string" + }, + "discount_good_id": { + "description": "关联信息id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/users/list": { + "get": { + "summary": "获取 优惠码\\代金券 用户关联列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "code_id", + "in": "query", + "description": "优惠码\\代金券 id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/users/add": { + "post": { + "summary": "新增 优惠码\\代金券 用户关联", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code_id": { + "description": "优惠码\\代金券 id", + "example": "", + "type": "string" + }, + "user_id": { + "description": "用户ID (与 user_group_id 二选一)", + "example": "", + "type": "string" + }, + "user_group_id": { + "description": "用户组ID(与 user_id 二选一)", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/users/update": { + "post": { + "summary": "修改 优惠码\\代金券 用户关联", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code_id": { + "description": "优惠码\\代金券 id", + "example": "", + "type": "string" + }, + "discount_user_id": { + "description": "关联信息id", + "example": "", + "type": "string" + }, + "user_id": { + "description": "用户ID (原用户关联信息如果使用的是 userId 则只能更新 userId,userGroupId 同理)", + "example": "", + "type": "string" + }, + "user_group_id": { + "description": "用户组ID(原用户关联信息如果使用的是 userId 则只能更新 userId,userGroupId 同理)", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/users/delete": { + "delete": { + "summary": "删除 优惠码\\代金券 用户关联", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code_id": { + "description": "优惠码\\代金券 id", + "example": "", + "type": "string" + }, + "discount_user_id": { + "description": "关联信息id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/user/list": { + "get": { + "summary": "获取用户 优惠码\\代金券 列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/user/add_coupon": { + "post": { + "summary": "为用户添加 代金券", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "discount_id": { + "description": "代金券 id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/user/update_coupon": { + "post": { + "summary": "修改用户 代金券", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": 0, + "type": "integer" + }, + "id": { + "description": "关联信息id", + "example": 0, + "type": "integer" + }, + "discount_id": { + "description": "代金券id", + "example": 0, + "type": "integer" + }, + "use_times": { + "description": "已使用次数", + "example": 0, + "type": "integer" + }, + "max_use_times": { + "description": "最大使用次数", + "example": 0, + "type": "integer" + }, + "expire_at": { + "description": "过期时间", + "example": 0, + "type": "integer" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/user/delete_coupon": { + "delete": { + "summary": "删除用户 代金券", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_id": { + "description": "用户ID", + "example": "", + "type": "string" + }, + "id": { + "description": "关联信息id", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/user/history": { + "get": { + "summary": "获取用户 优惠码\\代金券 使用记录", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "user_id", + "in": "query", + "description": "用户ID", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "query", + "description": "关联信息id", + "required": false, + "example": "", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/coupon/allocate": { + "post": { + "summary": "为用户分配代金券", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "code_id": { + "description": "优惠码\\代金券 id", + "example": "", + "type": "string" + }, + "user_id": { + "description": "用户ID (与 user_group_id 二选一)", + "example": "", + "type": "string" + }, + "user_group_id": { + "description": "用户组ID(与 user_id 二选一)", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/code/discount/coupon/holder_list": { + "get": { + "summary": "查询代金券的拥有者列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "code_id", + "in": "query", + "description": "优惠码\\代金券 id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/group/list": { + "get": { + "summary": "获取配置分组列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/group/info": { + "get": { + "summary": "获取配置分组信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "setting_group_id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/group/create": { + "post": { + "summary": "创建配置分组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + }, + "example": { + "code": 200, + "message": "Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/group/update": { + "post": { + "summary": "修改配置分组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "ID", + "example": "", + "type": "string" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/group/delete": { + "delete": { + "summary": "删除配置分组", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "setting_group_id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/list": { + "get": { + "summary": "获取配置列表", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "获取页码 默认 1", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "count", + "in": "query", + "description": "获取条数 默认 10", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "group_id", + "in": "query", + "description": "组id(与组名称二选一)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "group_name", + "in": "query", + "description": "组名称(与组id二选一)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/info": { + "get": { + "summary": "获取配置信息", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "配置id (与name二选一)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "query", + "description": "配置名称 (与id二选一)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/create": { + "post": { + "summary": "创建配置", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "value": { + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "type": { + "description": "类型 string/int/float/bool/file/file_list/string_list", + "example": "", + "type": "string" + }, + "setting_group_id": { + "description": "配置组id", + "example": 0, + "type": "integer" + }, + "open": { + "description": "是否开放访问", + "example": "", + "type": "boolean" + } + }, + "required": [ + "name", + "value", + "type" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/update": { + "post": { + "summary": "修改配置", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "value": { + "example": "", + "type": "string" + }, + "note": { + "description": "备注", + "example": "", + "type": "string" + }, + "type": { + "description": "类型 string/int/float/bool/file/file_list/string_list", + "example": "", + "type": "string" + }, + "setting_group_id": { + "description": "配置组id", + "example": "", + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/set_open": { + "post": { + "summary": "修改配置是否开放访问", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": 0, + "type": "integer" + }, + "open": { + "description": "是否开放", + "example": "", + "type": "boolean" + } + }, + "required": [ + "id", + "open" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/setting/delete": { + "delete": { + "summary": "删除配置", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/list": { + "get": { + "summary": "获取 KVM 主控服务列表", + "deprecated": false, + "description": "", + "operationId": "GetKvmServiceList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "搜索关键字", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/detail": { + "get": { + "summary": "获取 KVM 主控服务详情", + "deprecated": false, + "description": "", + "operationId": "GetKvmServiceDetail", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/create": { + "post": { + "summary": "创建 KVM 主控服务", + "deprecated": false, + "description": "", + "operationId": "CreateKvmService", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "服务名称", + "example": "", + "type": "string" + }, + "note": { + "description": "备注说明", + "example": "", + "type": "string" + }, + "host": { + "description": "服务地址", + "example": "", + "type": "string" + }, + "port": { + "description": "服务端口", + "example": "", + "type": "string" + }, + "token": { + "description": "认证 Token", + "example": "", + "type": "string" + } + }, + "required": [ + "name", + "host", + "port" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/update": { + "post": { + "summary": "修改 KVM 主控服务", + "deprecated": false, + "description": "", + "operationId": "UpdateKvmService", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + }, + "host": { + "example": "", + "type": "string" + }, + "port": { + "example": "", + "type": "string" + }, + "token": { + "example": "", + "type": "string" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/delete": { + "delete": { + "summary": "删除 KVM 主控服务", + "deprecated": false, + "description": "", + "operationId": "DeleteKvmService", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务管理", + "KvmService" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/list": { + "get": { + "summary": "获取本地主机组列表", + "deprecated": false, + "description": "", + "operationId": "GetKvmServiceHostGroupList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/sync": { + "post": { + "summary": "从远程同步主机组到本地", + "deprecated": false, + "description": "", + "operationId": "SyncKvmServiceHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/bind": { + "post": { + "summary": "绑定主机组到商品组或商品", + "deprecated": false, + "description": "", + "operationId": "BindKvmServiceHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "本地主机组 ID", + "example": 8, + "type": "integer" + }, + "good_group_id": { + "description": "绑定的商品分组 ID(与 good_id 二选一)", + "example": 51, + "type": "integer" + }, + "good_id": { + "description": "绑定的商品id(与 good_group_id 二选一)", + "example": 0, + "type": "integer" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/update": { + "post": { + "summary": "修改本地主机组信息", + "deprecated": false, + "description": "", + "operationId": "UpdateKvmServiceHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/host_group/generate_goods": { + "post": { + "summary": "根据主机组树自动生成 GoodGroup/Goods/Args", + "deprecated": false, + "description": "", + "operationId": "GenerateGoodsByHostGroup", + "tags": [ + "admin/微服务管理/虚拟化平台管理/宿主机组映射管理", + "KvmServiceHostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "description": "起始 KvmServiceHostGroup ID", + "example": 0, + "type": "integer" + }, + "parent_group_id": { + "description": "挂载到已有 GoodGroup 父级 ID", + "example": 0, + "type": "integer" + }, + "tag_id": { + "description": "根节点 GoodGroup 标签 ID", + "example": 0, + "type": "integer" + }, + "table": { + "description": "Goods 的 Table 标识", + "example": "kvm_service", + "type": "string" + } + }, + "required": [ + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/list": { + "get": { + "summary": "获取远程主机组列表", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "parent_id", + "in": "query", + "description": "筛选父级宿主机组", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/detail": { + "get": { + "summary": "获取远程主机组详情", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "主机组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/tree": { + "get": { + "summary": "获取远程主机组树形结构", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupGetTree", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/optimal_host": { + "get": { + "summary": "获取主机组最优主机配置信息", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupGetOptimalHostInfo", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_group_id", + "in": "query", + "description": "主机组id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/create": { + "post": { + "summary": "创建远程主机组", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "parent_id": { + "description": "筛选父级宿主机组", + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/update": { + "post": { + "summary": "修改远程主机组", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "note": { + "example": "", + "type": "string" + }, + "parent_id": { + "description": "父级宿主机组id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host_group/delete": { + "delete": { + "summary": "删除远程主机组", + "deprecated": false, + "description": "", + "operationId": "PointHostGroupDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机组管理", + "Point.HostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/list": { + "get": { + "summary": "获取宿主机列表", + "deprecated": false, + "description": "", + "operationId": "PointHostList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_group_id", + "in": "query", + "description": "筛选父级宿主机组", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/detail": { + "get": { + "summary": "获取宿主机详情", + "deprecated": false, + "description": "", + "operationId": "PointHostGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/metrics": { + "get": { + "summary": "获取宿主机指标数据", + "deprecated": false, + "description": "", + "operationId": "PointHostGetMetrics", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/add": { + "post": { + "summary": "新增宿主机", + "deprecated": false, + "description": "", + "operationId": "PointHostAdd", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + }, + "base_url": { + "description": "宿主机服务url", + "example": "", + "type": "string" + }, + "token": { + "description": "宿主机服务Token", + "example": "", + "type": "string" + }, + "ip": { + "description": "宿主机 Ip", + "example": "", + "type": "string" + }, + "port": { + "description": "宿主机 ssh端口", + "example": 0, + "type": "integer" + }, + "user": { + "description": "宿主机 ssh用户名(使用远程专用用户 默认为 tunneluser)", + "example": "", + "type": "string" + }, + "password": { + "description": "宿主机 ssh密码", + "example": "", + "type": "string" + }, + "private_key": { + "description": "宿主机 ssh私钥", + "example": "", + "type": "string" + }, + "max_cpu": { + "description": "宿主机 最大cpu核心限制(不是真实cpu核心,只是允许开多少核心)", + "example": 0, + "type": "integer" + }, + "max_memory": { + "description": "宿主机 最大内存限制", + "example": 0, + "type": "integer" + }, + "max_disk": { + "description": "宿主机 最大硬盘限制", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "宿主机 最大下行带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "宿主机 最大上行带宽", + "example": 0, + "type": "integer" + }, + "host_group_id": { + "description": "所属宿主机组", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "base_url", + "ip" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/update": { + "post": { + "summary": "修改宿主机", + "deprecated": false, + "description": "", + "operationId": "PointHostUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "example": 0, + "type": "integer" + }, + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + }, + "base_url": { + "description": "宿主机服务url", + "example": "", + "type": "string" + }, + "token": { + "description": "宿主机服务Token", + "example": "", + "type": "string" + }, + "ip": { + "description": "宿主机 Ip", + "example": "", + "type": "string" + }, + "port": { + "description": "宿主机 ssh端口", + "example": 0, + "type": "integer" + }, + "user": { + "description": "宿主机 ssh用户名(使用远程专用用户 默认为 tunneluser)", + "example": "", + "type": "string" + }, + "password": { + "description": "宿主机 ssh密码", + "example": "", + "type": "string" + }, + "private_key": { + "description": "宿主机 ssh私钥", + "example": "", + "type": "string" + }, + "max_cpu": { + "description": "宿主机 最大cpu核心限制(不是真实cpu核心,只是允许开多少核心)", + "example": 0, + "type": "integer" + }, + "max_memory": { + "description": "宿主机 最大内存限制", + "example": 0, + "type": "integer" + }, + "max_disk": { + "description": "宿主机 最大硬盘限制", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "宿主机 最大下行带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "宿主机 最大上行带宽", + "example": 0, + "type": "integer" + }, + "host_group_id": { + "description": "所属宿主机组", + "example": 0, + "type": "integer" + } + }, + "required": [ + "id", + "service_id", + "name", + "base_url", + "ip" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/delete": { + "delete": { + "summary": "删除宿主机", + "deprecated": false, + "description": "", + "operationId": "PointHostDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/宿主机管理", + "Point.Host" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/create_token": { + "post": { + "summary": "创建宿主机注册令牌", + "deprecated": false, + "description": "管理员创建一个带有宿主机基础配置的注册令牌。令牌有时效性(默认24小时),使用后自动失效。管理员将令牌提供给宿主机操作员,在 init_server.sh 中使用。", + "operationId": "PointHostCreateToken", + "tags": [ + "宿主机Token注册" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "type": "integer", + "description": "主控服务ID", + "example": 0 + }, + "name": { + "type": "string", + "description": "宿主机名称", + "example": "" + }, + "host_group_id": { + "type": "integer", + "description": "所属宿主机组ID", + "example": 0 + }, + "max_cpu": { + "type": "integer", + "description": "最大 CPU 核数", + "example": 0 + }, + "max_memory": { + "type": "integer", + "description": "最大内存(KB)", + "example": 0 + }, + "max_disk": { + "type": "integer", + "description": "最大磁盘(GB)", + "example": 0 + }, + "rx_bandwidth": { + "type": "integer", + "description": "最大下行带宽", + "example": 0 + }, + "tx_bandwidth": { + "type": "integer", + "description": "最大上行带宽", + "example": 0 + }, + "description": { + "type": "string", + "description": "宿主机描述", + "example": "" + }, + "expire_hours": { + "type": "integer", + "description": "令牌有效期(小时,默认24)", + "example": 0 + } + }, + "required": [ + "service_id", + "name", + "host_group_id", + "max_cpu", + "max_memory", + "max_disk" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "令牌创建成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "64位十六进制注册令牌" + }, + "expire_at": { + "type": "string", + "format": "date-time", + "description": "过期时间(RFC3339)" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/list": { + "get": { + "summary": "获取镜像列表", + "deprecated": false, + "description": "", + "operationId": "PointImageList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "os_type", + "in": "query", + "description": "筛选系统类型(linux\\windows)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "筛选镜像类型 (system 系统 \\ data 数据)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "筛选状态(pending\\downloading\\ready\\error)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "keyword", + "in": "query", + "description": "筛选关键词", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/detail": { + "get": { + "summary": "获取镜像详情", + "deprecated": false, + "description": "", + "operationId": "PointImageGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admins/service/host_service/point/image/compare_host": { + "get": { + "summary": "获取宿主机镜像列表与状态", + "deprecated": false, + "description": "对比主控服务器与指定宿主机的镜像列表,返回每个镜像的同步状态(synced/not_synced/downloading/error/pending)以及汇总统计", + "operationId": "PointImageCompareHost", + "tags": [ + "镜像管理" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "host_id": { + "type": "integer", + "description": "宿主机ID" + }, + "total": { + "type": "integer", + "description": "镜像总数" + }, + "synced": { + "type": "integer", + "description": "已同步数量" + }, + "not_synced": { + "type": "integer", + "description": "未同步数量" + }, + "data": { + "type": "array", + "description": "镜像对比详情列表", + "items": { + "type": "object", + "properties": { + "image": { + "type": "object", + "description": "镜像信息", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "os_type": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "description": { + "type": "string" + }, + "size": { + "type": "integer" + } + } + }, + "sync_status": { + "type": "string", + "description": "同步状态: synced | not_synced | downloading | error | pending" + }, + "host_status": { + "type": "string", + "description": "宿主机侧镜像状态,未同步时为空" + } + } + } + } + } + } + } + } + } + }, + "headers": {} + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string" + }, + "error": { + "type": "string" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/host_status": { + "get": { + "summary": "获取在指定宿主机上的状态", + "deprecated": false, + "description": "", + "operationId": "PointImageGetHostStatus", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "镜像id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "os_type": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "os_type", + "type", + "path", + "status", + "description", + "created_at", + "updated_at" + ] + }, + "status": { + "type": "string" + } + }, + "required": [ + "image", + "status" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/create": { + "post": { + "summary": "创建镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "path": { + "description": "地址(可以是url也可以是在服务器上的路径)\nhttp://........\n/root/data/...", + "example": "", + "type": "string" + }, + "os_type": { + "description": "系统类型(linux\\windows)", + "example": "", + "type": "string" + }, + "type": { + "description": "镜像类型 (system 系统 \\ data 数据)", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "name", + "path" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/update": { + "post": { + "summary": "修改镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + }, + "status": { + "description": "镜像状态(pending\\downloading\\ready\\error)", + "example": "", + "type": "string" + }, + "size": { + "description": "镜像大小", + "example": 0, + "type": "integer" + }, + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "image_name": { + "description": "名称", + "example": "", + "type": "string" + }, + "path": { + "description": "地址(可以是url也可以是在服务器上的路径)\nhttp://........\n/root/data/...", + "example": "", + "type": "string" + }, + "os_type": { + "description": "系统类型(linux\\windows)", + "example": "", + "type": "string" + }, + "type": { + "description": "镜像类型 (system 系统 \\ data 数据)", + "example": "", + "type": "string" + }, + "description": { + "description": "介绍", + "example": "", + "type": "string" + } + }, + "required": [ + "image_id", + "service_id", + "image_name", + "path" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/delete": { + "delete": { + "summary": "删除镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/reload": { + "post": { + "summary": "重新下载镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageReload", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "image_id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "image_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/sync": { + "post": { + "summary": "向宿主机同步镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageSync", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/image/reload_host": { + "post": { + "summary": "指定宿主机重新下载指定镜像", + "deprecated": false, + "description": "", + "operationId": "PointImageReloadHost", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/镜像管理", + "Point.Image" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "image_id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "os_type": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "os_type", + "type", + "path", + "status", + "description", + "created_at", + "updated_at" + ] + }, + "status": { + "type": "string" + } + }, + "required": [ + "image", + "status" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/list": { + "get": { + "summary": "获取网络列表", + "deprecated": false, + "description": "", + "operationId": "PointNetworkList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "关键字筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "网络类型(bridge(网桥) \\ nat(内网))", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "used", + "in": "query", + "description": "筛选是否被占用", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "name", + "in": "query", + "description": "筛选名称", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "bridge_name", + "in": "query", + "description": "筛选网桥名称", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ip_version", + "in": "query", + "description": "筛选ip类型 (ipv6 / ipv4)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "筛选虚拟机id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "properties": { + "count": { + "type": "integer" + } + }, + "required": [ + "count" + ] + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "nameservers": { + "type": "string" + }, + "type": { + "type": "string" + }, + "mac_address": { + "type": "string" + }, + "bridge_name": { + "type": "string" + }, + "ls_bridge_name": { + "type": "string" + }, + "ls_name": { + "type": "string" + }, + "target_device": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "address", + "gateway", + "nameservers", + "type", + "mac_address", + "bridge_name", + "ls_bridge_name", + "ls_name", + "target_device", + "host_id", + "created_at", + "updated_at" + ] + } + } + }, + "required": [ + "meta", + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/detail": { + "get": { + "summary": "获取网络详情", + "deprecated": false, + "description": "", + "operationId": "PointNetworkGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "network_id", + "in": "query", + "description": "网络id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "nameservers": { + "type": "string" + }, + "type": { + "type": "string" + }, + "mac_address": { + "type": "string" + }, + "bridge_name": { + "type": "string" + }, + "ls_bridge_name": { + "type": "string" + }, + "ls_name": { + "type": "string" + }, + "target_device": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "address", + "gateway", + "nameservers", + "type", + "mac_address", + "bridge_name", + "ls_bridge_name", + "ls_name", + "target_device", + "host_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/create": { + "post": { + "summary": "创建网络", + "deprecated": false, + "description": "", + "operationId": "PointNetworkCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "address": { + "description": "ip地址 CIDR类型 192.168.1.1/24", + "example": "", + "type": "string" + }, + "gateway": { + "description": "网关地址 如 192.168.1.1", + "example": "", + "type": "string" + }, + "nameservers": { + "description": "dns服务器(不填默认114.114.114.114,8.8.8.8) ", + "example": "", + "type": "string" + }, + "type": { + "description": "网络类型 bridge(网桥|外网) \\ nat(内网)", + "example": "", + "type": "string" + }, + "mac_address": { + "description": "虚拟网卡MAC地址(不填随机)", + "example": "", + "type": "string" + }, + "bridge_name": { + "description": "虚拟网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_bridge_name": { + "description": "宿主机逻辑网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_name": { + "description": "宿主机逻辑端口名称(不填默认)", + "example": "", + "type": "string" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "address", + "gateway", + "type", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "nameservers": { + "type": "string" + }, + "type": { + "type": "string" + }, + "mac_address": { + "type": "string" + }, + "bridge_name": { + "type": "string" + }, + "ls_bridge_name": { + "type": "string" + }, + "ls_name": { + "type": "string" + }, + "target_device": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "address", + "gateway", + "nameservers", + "type", + "mac_address", + "bridge_name", + "ls_bridge_name", + "ls_name", + "target_device", + "host_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/batch_create": { + "post": { + "summary": "批量创建网络", + "deprecated": false, + "description": "通过指定 IP 范围(start_ip ~ end_ip)批量创建网络,自动根据 IP 范围生成多个网络条目", + "tags": [ + "admin-KVM服务-网络" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "start_ip": { + "description": "开始IP地址(如 192.168.1.10)", + "example": "", + "type": "string" + }, + "end_ip": { + "description": "结束IP地址(如 192.168.1.50)", + "example": "", + "type": "string" + }, + "gateway": { + "description": "网关地址", + "example": "", + "type": "string" + }, + "nameservers": { + "description": "DNS服务器", + "example": "", + "type": "string" + }, + "type": { + "description": "网络类型(bridge | nat)", + "example": "", + "type": "string" + }, + "bridge_name": { + "description": "网桥名称", + "example": "", + "type": "string" + }, + "host_id": { + "description": "宿主机ID", + "example": 0, + "type": "integer" + }, + "mask": { + "description": "子网掩码位数(如 24)", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "start_ip", + "end_ip", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "需要创建的总数" + }, + "success": { + "type": "integer", + "description": "成功数" + }, + "failed": { + "type": "integer", + "description": "失败数" + }, + "data": { + "type": "array", + "description": "成功创建的网络列表", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "address": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "type": { + "type": "string" + }, + "host_id": { + "type": "integer" + } + } + } + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/update": { + "post": { + "summary": "修改网络", + "deprecated": false, + "description": "", + "operationId": "PointNetworkUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "address": { + "description": "ip地址 CIDR类型 192.168.1.1/24", + "example": "", + "type": "string" + }, + "gateway": { + "description": "网关地址 如 192.168.1.1", + "example": "", + "type": "string" + }, + "nameservers": { + "description": "dns服务器(不填默认114.114.114.114,8.8.8.8)", + "example": "", + "type": "string" + }, + "type": { + "description": "网络类型 bridge(网桥) \\ nat(内网)", + "example": "", + "type": "string" + }, + "mac_address": { + "description": "虚拟网卡MAC地址(不填随机)", + "example": "", + "type": "string" + }, + "bridge_name": { + "description": "虚拟网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_bridge_name": { + "description": "宿主机逻辑网桥名称(不填默认)", + "example": "", + "type": "string" + }, + "ls_name": { + "description": "宿主机逻辑端口名称(不填默认)", + "example": "", + "type": "string" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/network/delete": { + "delete": { + "summary": "删除网络", + "deprecated": false, + "description": "", + "operationId": "PointNetworkDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/网络管理", + "Point.Network" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "network_id", + "in": "query", + "description": "网络id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/list": { + "get": { + "summary": "获取数据卷列表", + "deprecated": false, + "description": "", + "operationId": "PointVolumeList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "example": 1, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "status", + "in": "query", + "description": "筛选数据卷状态( pending \\ ready \\ error \\ unknown)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id(单个请求虚拟机需要)", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "筛选所属虚拟机id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "筛选镜像id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/detail": { + "get": { + "summary": "获取数据卷详情", + "deprecated": false, + "description": "", + "operationId": "PointVolumeGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "volume_id", + "in": "query", + "description": "数据卷id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "is_system": { + "type": "boolean" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "host_volume_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "size", + "is_system", + "path", + "status", + "host_id", + "host_volume_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/create": { + "post": { + "summary": "创建数据卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "size": { + "description": "数据卷大小 GB", + "example": 0, + "type": "integer" + }, + "is_system": { + "description": "是否系统镜像", + "example": "", + "type": "boolean" + }, + "target_device": { + "description": "挂载虚拟机目标设备名称(不填自动生成)", + "example": "", + "type": "string" + }, + "vm_id": { + "description": "挂载的虚拟机id", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "所属镜像id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "name", + "size", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "status": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "host_volume_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "name", + "size", + "path", + "status", + "host_id", + "host_volume_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/resize": { + "post": { + "summary": "调整数据卷大小", + "deprecated": false, + "description": "", + "operationId": "PointVolumeResize", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + }, + "size": { + "description": "大小 GB", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id", + "size" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + } + }, + "required": [ + "seconds" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + } + }, + "required": [ + "seconds" + ] + } + }, + "required": [ + "id", + "host_id", + "created_at", + "updated_at" + ] + }, + "task": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "task_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "message": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "task_id", + "name", + "status", + "tag", + "message", + "host_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data", + "task" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/mount": { + "post": { + "summary": "挂载卷到虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVolumeMount", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/unmount": { + "post": { + "summary": "卸载卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeUnmount", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/transfer": { + "post": { + "summary": "迁移卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeTransfer", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "volume_id": { + "description": "数据卷id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "目标虚拟机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "volume_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + } + }, + "required": [ + "seconds" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + } + }, + "required": [ + "seconds" + ] + } + }, + "required": [ + "id", + "host_id", + "created_at", + "updated_at" + ] + }, + "task": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "task_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "message": { + "type": "string" + }, + "host_id": { + "type": "integer" + }, + "created_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + }, + "updated_at": { + "type": "object", + "properties": { + "seconds": { + "type": "integer" + }, + "nanos": { + "type": "integer" + } + }, + "required": [ + "seconds", + "nanos" + ] + } + }, + "required": [ + "id", + "task_id", + "name", + "status", + "tag", + "message", + "host_id", + "created_at", + "updated_at" + ] + } + }, + "required": [ + "data", + "task" + ] + } + }, + "required": [ + "code", + "message", + "data" + ] + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/volume/delete": { + "delete": { + "summary": "删除卷", + "deprecated": false, + "description": "", + "operationId": "PointVolumeDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/数据卷管理", + "Point.Volume" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "volume_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/list": { + "get": { + "summary": "获取虚拟机列表", + "deprecated": false, + "description": "", + "operationId": "PointVMList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "筛选关键词", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机id", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "image_id", + "in": "query", + "description": "筛选镜像", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "port_group_id", + "in": "query", + "description": "筛选安全组", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "status", + "in": "query", + "description": "筛选状态 (pending \\ creating \\ ready \\ running \\ stopped \\ error \\ paused \\ reboot \\ poweroff \\ unknown)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user_id", + "in": "query", + "description": "筛选用户", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/detail": { + "get": { + "summary": "获取虚拟机详情", + "deprecated": false, + "description": "", + "operationId": "PointVMGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/status": { + "get": { + "summary": "获取虚拟机状态", + "deprecated": false, + "description": "", + "operationId": "PointVMGetStatus", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/metrics": { + "get": { + "summary": "获取虚拟机状态指标数据", + "deprecated": false, + "description": "", + "operationId": "PointVMGetMetrics", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_name", + "in": "query", + "description": "虚拟机名称", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/create": { + "post": { + "summary": "创建虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称(不传随机)", + "example": "", + "type": "string" + }, + "memory": { + "description": "内存 (KB)", + "example": 0, + "type": "integer" + }, + "vcpu": { + "description": "虚拟 CPU 核数", + "example": 0, + "type": "integer" + }, + "system_size": { + "description": "系统盘大小 (GB)", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机id(与 host_group_id 二选一)", + "example": 0, + "type": "integer" + }, + "host_group_id": { + "description": "宿主机组id(与 host_id 二选一)", + "example": 0, + "type": "integer" + }, + "user_id": { + "description": "用户id", + "example": 0, + "type": "integer" + }, + "ipv4_num": { + "description": "IPv4 IP数量(与 network_ids 二选一)", + "example": 0, + "type": "integer" + }, + "ipv6_num": { + "description": "IPv6 IP数量(与 network_ids 二选一)", + "example": 0, + "type": "integer" + }, + "network_ids": { + "description": "网络ip列表 (与 ip_num 二选一)", + "example": "", + "type": "array" + }, + "data_volume_size": { + "type": "integer", + "description": "额外数据卷大小(GB)", + "example": 0 + } + }, + "required": [ + "service_id", + "name", + "memory", + "vcpu", + "system_size", + "image_id" + ] + }, + "examples": {} + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/update": { + "post": { + "summary": "修改虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMUpdate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "root_password": { + "description": "root密码", + "example": "", + "type": "string" + }, + "ssh_port": { + "description": "ssh端口", + "example": 0, + "type": "integer" + }, + "network_ids": { + "description": "网络id列表", + "example": "", + "type": "array" + }, + "internet_network_id": { + "description": "内网id", + "example": 0, + "type": "integer" + }, + "port_group_id": { + "description": "安全组id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/rebuild": { + "post": { + "summary": "重装虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMRebuild", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "image_id": { + "description": "镜像id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id", + "image_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/refactor": { + "post": { + "summary": "重构虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMRefactor", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "memory": { + "description": "内存 KB", + "example": 0, + "type": "integer" + }, + "vcpu": { + "description": "cpu数量", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "root_password": { + "description": "root密码", + "example": "", + "type": "string" + }, + "uuid": { + "description": "虚拟机uuid(不填随机)", + "example": "", + "type": "string" + }, + "mate_data_id": { + "description": "虚拟机元数据uuid(不填随机)", + "example": "", + "type": "string" + }, + "physical_name": { + "description": "物理网卡名称(不填默认)", + "example": "", + "type": "string" + }, + "config_path": { + "description": "配置文件保存地址(不填默认)", + "example": "", + "type": "string" + }, + "ssh_port": { + "description": "ssh端口(不填默认)", + "example": 0, + "type": "integer" + }, + "vnc_port": { + "description": "vnc端口(不填默认)", + "example": 0, + "type": "integer" + }, + "vnc_password": { + "description": "vnc密码(不填随机)", + "example": "", + "type": "string" + }, + "network_ids": { + "description": "网络id列表(使用 , 分割)", + "example": "", + "type": "array" + }, + "internet_network_id": { + "description": "内网网络id", + "example": 0, + "type": "integer" + }, + "port_group_id": { + "description": "安全组id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/update_traffic": { + "post": { + "summary": "修改虚拟机带宽", + "deprecated": false, + "description": "", + "operationId": "PointVMUpdateTraffic", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "rx_bandwidth": { + "description": "入向带宽", + "example": 0, + "type": "integer" + }, + "tx_bandwidth": { + "description": "出向带宽", + "example": 0, + "type": "integer" + }, + "traffic_max": { + "description": "每月最大流量 KB", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/start": { + "post": { + "summary": "启动虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMStart", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/stop": { + "post": { + "summary": "停止虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMStop", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/reboot": { + "post": { + "summary": "重启虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMReboot", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/suspend": { + "post": { + "summary": "暂停虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMSuspend", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "主控服务id", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/resume": { + "post": { + "summary": "恢复虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMResume", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/rescue": { + "post": { + "summary": "虚拟机进入救援系统", + "deprecated": false, + "description": "", + "operationId": "PointVMRescue", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/exit_rescue": { + "post": { + "summary": "虚拟机退出救援系统", + "deprecated": false, + "description": "", + "operationId": "PointVMExitRescue", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + }, + "force": { + "description": "是否强制", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/delete": { + "delete": { + "summary": "删除虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointVMDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/虚拟机管理", + "Point.VM" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/migrate": { + "post": { + "summary": "更换虚拟机所在宿主机", + "deprecated": false, + "description": "", + "tags": [ + "KVM-VM" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM 服务 ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机 ID", + "example": 0, + "type": "integer" + }, + "target_host_id": { + "description": "目标宿主机 ID(与 target_host_group_id 二选一)", + "example": 0, + "type": "integer" + }, + "target_host_group_id": { + "description": "目标宿主机组 ID(与 target_host_id 二选一)", + "example": 0, + "type": "integer" + }, + "ipv4_num": { + "description": "新分配的IPv4数量(不传保持原数量)", + "example": 0, + "type": "integer" + }, + "ipv6_num": { + "description": "新分配的IPv6数量(不传保持原数量)", + "example": 0, + "type": "integer" + }, + "network_ids": { + "description": "指定网络 ID 列表(可选,不传则自动分配)", + "example": "", + "type": "array" + } + }, + "required": [ + "service_id", + "vm_id" + ] + }, + "examples": {} + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MigrateVMReply" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/data_migrate": { + "post": { + "summary": "发起虚拟机数据迁移", + "deprecated": false, + "description": "发起跨服务虚拟机数据迁移。源服务的虚拟机数据将通过 rsync 传输到目标服务的宿主机上,完成后在目标宿主机上校验并恢复虚拟机。整个流程由 apiserver 后台协程编排,支持通过 progress 接口查询实时进度。", + "operationId": "PointVMDataMigrate", + "tags": [ + "虚拟机数据迁移" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "source_service_id": { + "type": "integer", + "description": "源主控服务id", + "example": 0 + }, + "source_vm_id": { + "type": "integer", + "description": "源虚拟机ID", + "example": 0 + }, + "target_service_id": { + "type": "integer", + "description": "目标主控服务id", + "example": 0 + }, + "target_host_id": { + "type": "integer", + "description": "目标宿主机ID", + "example": 0 + }, + "ipv4_num": { + "type": "integer", + "description": "在目标宿主机分配的 IPv4 数量(可选,0则不分配)", + "example": 0 + }, + "ipv6_num": { + "type": "integer", + "description": "在目标宿主机分配的 IPv6 数量(可选,0则不分配)", + "example": 0 + }, + "network_ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "在目标宿主机指定的网络ID列表(可选)", + "example": "" + } + }, + "required": [ + "source_service_id", + "source_vm_id", + "target_service_id", + "target_host_id" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "迁移任务已发起", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "migration_id": { + "type": "string", + "description": "迁移任务ID,用于查询进度" + }, + "export_task": { + "type": "object", + "description": "导出任务信息", + "properties": {} + }, + "source_vm": { + "type": "object", + "description": "源虚拟机信息", + "properties": {} + }, + "target_host_id": { + "type": "integer", + "description": "目标宿主机ID" + }, + "target_host_ip": { + "type": "string", + "description": "目标宿主机IP" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/data_migrate/progress": { + "get": { + "summary": "获取虚拟机数据迁移进度", + "deprecated": false, + "description": "查询虚拟机数据迁移的实时进度。支持两种查询方式:1) 通过 migration_id 查询跨服务迁移整体进度;2) 通过 service_id + task_id + host_id 查询单个服务端的迁移任务进度。", + "operationId": "PointVMDataMigrateProgress", + "tags": [ + "虚拟机数据迁移" + ], + "parameters": [ + { + "name": "migration_id", + "in": "query", + "description": "迁移任务ID(data_migrate 接口返回的 migration_id)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "service_id", + "in": "query", + "description": "KVM 服务ID(直接查询模式)", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "task_id", + "in": "query", + "description": "任务ID(直接查询模式)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机ID(直接查询模式)", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "查询成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "stage": { + "type": "string", + "enum": [ + "exporting", + "transferring", + "validating", + "importing", + "done", + "failed" + ], + "description": "当前阶段" + }, + "progress": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "description": "进度百分比" + }, + "speed": { + "type": "string", + "description": "传输速度(如 10.5MB/s)" + }, + "message": { + "type": "string", + "description": "状态信息" + }, + "detail": { + "type": "string", + "description": "详细信息(如当前正在传输的文件名)" + }, + "export_task_id": { + "type": "string", + "description": "导出任务ID" + }, + "import_task_id": { + "type": "string", + "description": "导入任务ID(导入阶段才有)" + }, + "error": { + "type": "string", + "description": "错误信息(失败时)" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vm/data_migrate/abort": { + "post": { + "summary": "中断虚拟机数据迁移", + "deprecated": false, + "description": "中断正在进行的虚拟机数据迁移操作。清除源虚拟机的迁移锁标记(migrating=false),恢复虚拟机正常操作能力。远端任务由 Celery 超时机制自动终止。", + "operationId": "PointVMAbortDataMigrate", + "tags": [ + "数据迁移管理" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "type": "integer", + "description": "KVM 服务ID(源虚拟机所在的服务)", + "example": 0 + }, + "vm_id": { + "type": "integer", + "description": "源虚拟机ID", + "example": 0 + } + }, + "required": [ + "service_id", + "vm_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "中断成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/list": { + "get": { + "summary": "获取安全组列表", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "主控服务id", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "lock", + "in": "query", + "description": "筛选是否锁定(锁定后用户无法修改)", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "drop_all", + "in": "query", + "description": "筛选是否开启白名单模式", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "shared", + "in": "query", + "description": "是否为共享安全组", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "user_id", + "in": "query", + "description": "筛选用户ID", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "direction", + "in": "query", + "description": "筛选方向 in / out", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/detail": { + "get": { + "summary": "获取安全组详情", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupGet", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/create": { + "post": { + "summary": "创建安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupCreate", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "direction": { + "description": "方向 (in\\out)", + "example": "", + "type": "string" + }, + "lock": { + "description": "是否锁定(锁定后用户无法修改)", + "example": "", + "type": "boolean" + }, + "drop_all": { + "description": "是否开启白名单模式", + "example": "", + "type": "boolean" + }, + "host_id": { + "description": "所属宿主机id", + "example": 0, + "type": "integer" + }, + "user_id": { + "description": "所属用户ID", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "name", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/update": { + "post": { + "summary": "修改安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupUpdate", + "tags": [ + "安全组" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "description": "安全组id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "安全组名称", + "example": "", + "type": "string" + }, + "direction": { + "description": "方向 (in\\out)", + "example": "", + "type": "string" + }, + "lock": { + "description": "是否锁定(锁定后用户无法修改)", + "example": "", + "type": "boolean" + }, + "drop_all": { + "description": "是否开启白名单模式", + "example": "", + "type": "boolean" + }, + "user_id": { + "description": "用户ID", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/sync": { + "post": { + "summary": "同步安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupSync", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "同步到的宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/bind": { + "post": { + "summary": "绑定安全组到虚拟机", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupBind", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/unbind": { + "post": { + "summary": "解绑安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupUnbind", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "vm_id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/delete": { + "delete": { + "summary": "删除安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupDelete", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/enable_whitelist": { + "post": { + "summary": "开启安全组白名单", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupEnableWhitelist", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/disable_whitelist": { + "post": { + "summary": "关闭安全组白名单", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupDisableWhitelist", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/create_rule": { + "post": { + "summary": "新增安全组规则", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupCreateRule", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "group_id": { + "description": "所属安全组", + "example": 0, + "type": "integer" + }, + "priority": { + "description": "优先级", + "example": 0, + "type": "integer" + }, + "protocol": { + "description": "协议(tcp \\ udp)", + "example": "", + "type": "string" + }, + "action": { + "description": "动作 (allow \\ deny)", + "example": "", + "type": "string" + }, + "port_range": { + "description": "端口范围,两种写法: 80-90(范围写法) \\ 80(指定写法)", + "example": "", + "type": "string" + }, + "ip_range": { + "description": "ip范围 192.168.1.1/24 ", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "group_id", + "protocol", + "action" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/update_rule": { + "post": { + "summary": "修改安全组规则", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupUpdateRule", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "port_group_id": { + "example": 0, + "type": "integer" + }, + "priority": { + "example": 0, + "type": "integer" + }, + "protocol": { + "example": "", + "type": "string" + }, + "action": { + "example": "", + "type": "string" + }, + "port_range": { + "example": "", + "type": "string" + }, + "ip_range": { + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "id", + "port_group_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/delete_rule": { + "delete": { + "summary": "删除安全组规则", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupDeleteRule", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/apply": { + "post": { + "summary": "应用安全组", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupApply", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/安全组管理", + "Point.PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/post_group/set_shared": { + "post": { + "summary": "设置安全组共享状态", + "deprecated": false, + "description": "", + "operationId": "PointPostGroupSetShared", + "tags": [ + "安全组" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "id": { + "description": "安全组ID", + "example": 0, + "type": "integer" + }, + "shared": { + "description": "是否共享", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/list": { + "get": { + "summary": "获取 VNC 节点列表", + "deprecated": false, + "description": "", + "operationId": "PointVNCGetNodeList", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "page_size", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/vm_vnc": { + "get": { + "summary": "获取虚拟机 VNC 连接信息", + "deprecated": false, + "description": "", + "operationId": "PointVNCGetVmVNC", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/add": { + "post": { + "summary": "新增 VNC 节点", + "deprecated": false, + "description": "", + "operationId": "PointVNCAddNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "name": { + "description": "名称", + "example": "", + "type": "string" + }, + "ip": { + "description": "服务ip", + "example": "", + "type": "string" + }, + "port": { + "description": "服务端口", + "example": "", + "type": "string" + }, + "token": { + "description": "服务token", + "example": "", + "type": "string" + }, + "use_ssl": { + "description": "是否启用ssl", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "name", + "ip", + "port" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/test": { + "post": { + "summary": "测试 VNC 节点连接", + "deprecated": false, + "description": "", + "operationId": "PointVNCTestNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "主控服务id", + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "测试的宿主机id", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/update": { + "post": { + "summary": "修改 VNC 节点", + "deprecated": false, + "description": "", + "operationId": "PointVNCUpdateNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "example": 0, + "type": "integer" + }, + "id": { + "example": 0, + "type": "integer" + }, + "name": { + "example": "", + "type": "string" + }, + "ip": { + "example": "", + "type": "string" + }, + "port": { + "example": "", + "type": "string" + }, + "token": { + "example": "", + "type": "string" + }, + "use_ssl": { + "description": "是否启用ssl", + "example": "", + "type": "boolean" + } + }, + "required": [ + "service_id", + "id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/vnc/delete": { + "delete": { + "summary": "删除 VNC 节点", + "deprecated": false, + "description": "", + "operationId": "PointVNCDeleteNode", + "tags": [ + "admin/微服务管理/虚拟化平台管理/主控服务接口/vnc节点管理", + "Point.VNC" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "required": false, + "example": "Bearer {{token}}", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/snapshot/list": { + "get": { + "summary": "获取快照列表", + "deprecated": false, + "description": "", + "operationId": "PointSnapshotList", + "tags": [ + "快照" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机ID", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "搜索关键字", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "快照状态", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/snapshot/progress": { + "get": { + "summary": "获取快照任务进度", + "deprecated": false, + "description": "", + "operationId": "PointSnapshotProgress", + "tags": [ + "快照" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "task_id", + "in": "query", + "description": "任务ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/snapshot/create": { + "post": { + "summary": "创建快照", + "deprecated": false, + "description": "", + "operationId": "PointSnapshotCreate", + "tags": [ + "快照" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "name": { + "description": "快照名称", + "example": "", + "type": "string" + }, + "description": { + "description": "快照描述", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "vm_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/snapshot/restore": { + "post": { + "summary": "恢复快照", + "deprecated": false, + "description": "", + "operationId": "PointSnapshotRestore", + "tags": [ + "快照" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "snapshot_id": { + "description": "快照ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "name": { + "description": "快照名称", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "snapshot_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/snapshot/delete": { + "post": { + "summary": "删除快照", + "deprecated": false, + "description": "", + "operationId": "PointSnapshotDelete", + "tags": [ + "快照" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "snapshot_id": { + "description": "快照ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "name": { + "description": "快照名称", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "snapshot_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/snapshot/count": { + "get": { + "summary": "获取快照数量与上限", + "deprecated": false, + "description": "", + "operationId": "PointSnapshotGetCount", + "tags": [ + "管理员-快照" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "vm_id": { + "type": "integer", + "format": "int64", + "description": "虚拟机ID" + }, + "count": { + "type": "integer", + "format": "uint32", + "description": "当前快照数量" + }, + "limit": { + "type": "integer", + "format": "uint32", + "description": "快照上限" + } + } + } + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/snapshot/set_limit": { + "post": { + "summary": "设置快照数量上限", + "deprecated": false, + "description": "", + "operationId": "PointSnapshotSetLimit", + "tags": [ + "管理员-快照" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "limit": { + "description": "快照数量上限", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id", + "limit" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "vm_id": { + "type": "integer", + "format": "int64" + }, + "count": { + "type": "integer", + "format": "uint32" + }, + "limit": { + "type": "integer", + "format": "uint32" + } + } + } + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/backup/list": { + "get": { + "summary": "获取备份列表", + "deprecated": false, + "description": "", + "operationId": "PointBackupList", + "tags": [ + "备份" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机ID", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "搜索关键字", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "备份状态", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/backup/progress": { + "get": { + "summary": "获取备份任务进度", + "deprecated": false, + "description": "", + "operationId": "PointBackupProgress", + "tags": [ + "备份" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "task_id", + "in": "query", + "description": "任务ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/backup/create": { + "post": { + "summary": "创建备份", + "deprecated": false, + "description": "", + "operationId": "PointBackupCreate", + "tags": [ + "备份" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "name": { + "description": "备份名称", + "example": "", + "type": "string" + }, + "description": { + "description": "备份描述", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "vm_id", + "name" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/backup/restore": { + "post": { + "summary": "恢复备份", + "deprecated": false, + "description": "", + "operationId": "PointBackupRestore", + "tags": [ + "备份" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "backup_id": { + "description": "备份ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "name": { + "description": "备份名称", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "backup_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/backup/delete": { + "post": { + "summary": "删除备份", + "deprecated": false, + "description": "", + "operationId": "PointBackupDelete", + "tags": [ + "备份" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "backup_id": { + "description": "备份ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "name": { + "description": "备份名称", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "backup_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/backup/count": { + "get": { + "summary": "获取备份数量与上限", + "deprecated": false, + "description": "", + "operationId": "PointBackupGetCount", + "tags": [ + "管理员-备份" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_id", + "in": "query", + "description": "虚拟机ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "vm_id": { + "type": "integer", + "format": "int64", + "description": "虚拟机ID" + }, + "count": { + "type": "integer", + "format": "uint32", + "description": "当前备份数量" + }, + "limit": { + "type": "integer", + "format": "uint32", + "description": "备份上限" + } + } + } + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/backup/set_limit": { + "post": { + "summary": "设置备份数量上限", + "deprecated": false, + "description": "", + "operationId": "PointBackupSetLimit", + "tags": [ + "管理员-备份" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM服务ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机ID", + "example": 0, + "type": "integer" + }, + "limit": { + "description": "备份数量上限", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "vm_id", + "limit" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "vm_id": { + "type": "integer", + "format": "int64" + }, + "count": { + "type": "integer", + "format": "uint32" + }, + "limit": { + "type": "integer", + "format": "uint32" + } + } + } + } + } + } + } + }, + "400": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/networking/create": { + "post": { + "summary": "创建用户组网", + "deprecated": false, + "description": "", + "tags": [ + "KVM-UserNetworking" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM 服务 ID", + "example": 0, + "type": "integer" + }, + "name": { + "description": "组网名称", + "example": "", + "type": "string" + }, + "description": { + "description": "组网描述", + "example": "", + "type": "string" + }, + "user_id": { + "description": "用户 ID", + "example": 0, + "type": "integer" + }, + "host_id": { + "description": "宿主机 ID", + "example": 0, + "type": "integer" + }, + "bridge_name": { + "description": "网桥名称", + "example": "", + "type": "string" + }, + "gateway": { + "description": "网关地址", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "user_id", + "host_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserNetworkingData" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/networking/assign": { + "post": { + "summary": "为虚拟机分配组网 IP", + "deprecated": false, + "description": "", + "tags": [ + "KVM-UserNetworking" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM 服务 ID", + "example": 0, + "type": "integer" + }, + "networking_id": { + "description": "组网 ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机 ID", + "example": 0, + "type": "integer" + }, + "ip": { + "description": "指定 IP,不传则自动分配", + "example": "", + "type": "string" + } + }, + "required": [ + "service_id", + "networking_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "networking": { + "$ref": "#/components/schemas/UserNetworkingData" + }, + "network": { + "$ref": "#/components/schemas/Network" + }, + "task": { + "$ref": "#/components/schemas/Task" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/networking/list": { + "get": { + "summary": "获取组网列表", + "deprecated": false, + "description": "", + "tags": [ + "KVM-UserNetworking" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "页码", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "count", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "按宿主机 ID 筛选", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "user_id", + "in": "query", + "description": "按用户 ID 筛选", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键词搜索", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "总数" + } + } + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserNetworkingData" + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/networking/detail": { + "get": { + "summary": "获取组网详情", + "deprecated": false, + "description": "", + "tags": [ + "KVM-UserNetworking" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "networking_id", + "in": "query", + "description": "组网 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserNetworkingData" + }, + "networks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkingNetworkItem" + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/networking/delete": { + "delete": { + "summary": "删除组网", + "deprecated": false, + "description": "", + "tags": [ + "KVM-UserNetworking" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "networking_id", + "in": "query", + "description": "组网 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserNetworkingData" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/networking/remove_network": { + "post": { + "summary": "删除组网下的指定网络", + "deprecated": false, + "description": "", + "tags": [ + "KVM-UserNetworking" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "description": "KVM 服务 ID", + "example": 0, + "type": "integer" + }, + "networking_id": { + "description": "组网 ID", + "example": 0, + "type": "integer" + }, + "network_id": { + "description": "网络 ID", + "example": 0, + "type": "integer" + }, + "vm_id": { + "description": "虚拟机 ID(用于从 VM 中移除网络)", + "example": 0, + "type": "integer" + } + }, + "required": [ + "service_id", + "networking_id", + "network_id", + "vm_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserNetworkingData" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/task/list": { + "get": { + "summary": "获取任务列表", + "deprecated": false, + "description": "按条件筛选获取指定宿主机上的任务列表,支持分页和多条件过滤", + "tags": [ + "KVM Task" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机 ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "页码(从 1 开始)", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "status", + "in": "query", + "description": "任务状态筛选", + "required": false, + "schema": { + "type": "string", + "enum": [ + "pending", + "running", + "success", + "failed", + "canceled" + ] + } + }, + { + "name": "type", + "in": "query", + "description": "任务类型筛选", + "required": false, + "schema": { + "type": "string", + "enum": [ + "vm", + "image", + "volume", + "snapshot", + "backup" + ] + } + }, + { + "name": "tag", + "in": "query", + "description": "任务标签筛选(TaskTags 枚举值)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "target_id", + "in": "query", + "description": "目标资源 ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "keyword", + "in": "query", + "description": "关键词搜索(匹配任务名称)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "success" + }, + "data": { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + } + }, + "total": { + "type": "integer", + "description": "总数量" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/task/status": { + "get": { + "summary": "查询任务状态", + "deprecated": false, + "description": "查询指定宿主机上某个任务的当前状态", + "tags": [ + "KVM Task" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机 ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "task_id", + "in": "query", + "description": "任务 ID(Celery task_id)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "success" + }, + "data": { + "type": "object", + "properties": { + "task_id": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "pending", + "running", + "success", + "failed", + "canceled" + ] + }, + "meta": { + "type": "string", + "description": "JSON 序列化的任务元数据" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/task/logs": { + "get": { + "summary": "获取任务日志", + "deprecated": false, + "description": "获取指定宿主机上某个任务的日志(最后 100 行)", + "tags": [ + "KVM Task" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机 ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "task_id", + "in": "query", + "description": "任务 ID(Celery task_id)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "success" + }, + "data": { + "type": "object", + "properties": { + "task_id": { + "type": "string" + }, + "logs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "日志行列表" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/task/cancel": { + "post": { + "summary": "取消任务", + "deprecated": false, + "description": "取消指定宿主机上正在执行的任务", + "tags": [ + "KVM Task" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "service_id": { + "type": "integer", + "description": "KVM 服务 ID", + "example": 0 + }, + "host_id": { + "type": "integer", + "format": "int64", + "description": "宿主机 ID", + "example": 0 + }, + "task_id": { + "type": "string", + "description": "任务 ID(Celery task_id)", + "example": "" + }, + "terminate": { + "type": "boolean", + "default": false, + "description": "是否强制终止(true: 发送 SIGTERM 强制结束; false: 仅标记取消)", + "example": "false" + } + }, + "required": [ + "service_id", + "host_id", + "task_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "success" + }, + "data": { + "type": "object", + "properties": { + "task_id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "terminated": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/host_service/point/host/metrics_history": { + "get": { + "summary": "查询历史指标(宿主机或虚拟机)", + "deprecated": false, + "description": "查询指定时间范围内的历史指标数据。当 vm_name 为空时查询宿主机指标,非空时查询对应虚拟机指标。支持通过 interval 参数控制聚合粒度(time_bucket)。数据来源于宿主机上的 TimescaleDB。", + "operationId": "PointMetricsHistory", + "tags": [ + "指标历史" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM 服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "vm_name", + "in": "query", + "description": "虚拟机名称(留空查宿主机指标)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "start", + "in": "query", + "description": "开始时间(RFC3339,如 2026-04-07T00:00:00Z)", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "end_time", + "in": "query", + "description": "结束时间(RFC3339)", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "interval", + "in": "query", + "description": "聚合粒度(如 1m, 5m, 1h, 1d)", + "required": false, + "schema": { + "type": "string", + "default": "1m" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "查询成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "array", + "description": "时间序列数据点", + "items": { + "type": "object", + "properties": { + "bucket": { + "type": "string", + "format": "date-time", + "description": "时间桶" + }, + "cpu_usage": { + "type": "number", + "description": "CPU 使用率 %" + }, + "mem_used": { + "type": "integer", + "description": "已用内存 (KB)" + }, + "mem_total": { + "type": "integer", + "description": "总内存 (KB)" + }, + "net_rx": { + "type": "number", + "description": "网络接收 (bytes/s)" + }, + "net_tx": { + "type": "number", + "description": "网络发送 (bytes/s)" + } + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/vnc_command/group/list": { + "get": { + "summary": "获取指令分组列表(含指令项)", + "deprecated": false, + "description": "", + "operationId": "VncCommandGroupList", + "tags": [ + "VNC指令管理" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "查询成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/vnc_command/group/create": { + "post": { + "summary": "创建指令分组", + "deprecated": false, + "description": "", + "operationId": "VncCommandGroupCreate", + "tags": [ + "VNC指令管理" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "分组名称", + "example": "" + }, + "sort": { + "type": "integer", + "description": "排序", + "example": 0 + }, + "default_icon": { + "description": "分组文本图标(如 📚),当无文件图标时使用", + "example": "", + "type": "string" + }, + "icon_file_id": { + "description": "分组图标文件ID", + "example": "", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/vnc_command/group/update": { + "post": { + "summary": "修改指令分组", + "deprecated": false, + "description": "", + "operationId": "VncCommandGroupUpdate", + "tags": [ + "VNC指令管理" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "分组ID", + "example": 0 + }, + "name": { + "type": "string", + "example": "" + }, + "sort": { + "type": "integer", + "example": 0 + }, + "default_icon": { + "description": "分组文本图标(如 📚),当无文件图标时使用", + "example": "", + "type": "string" + }, + "icon_file_id": { + "type": "integer", + "description": "分组图标文件ID", + "example": 0 + } + }, + "required": [ + "id" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "修改成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/vnc_command/group/delete": { + "delete": { + "summary": "删除指令分组(级联删除指令项)", + "deprecated": false, + "description": "", + "operationId": "VncCommandGroupDelete", + "tags": [ + "VNC指令管理" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/vnc_command/item/create": { + "post": { + "summary": "创建指令项", + "deprecated": false, + "description": "", + "operationId": "VncCommandItemCreate", + "tags": [ + "VNC指令管理" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "group_id": { + "type": "integer", + "description": "所属分组ID", + "example": 0 + }, + "label": { + "type": "string", + "description": "指令名称", + "example": "" + }, + "cmd": { + "type": "string", + "description": "指令内容(支持 %var% 变量占位符)", + "example": "" + }, + "vars": { + "type": "string", + "description": "变量列表 JSON,格式 [{\"k\":\"path\",\"p\":\"目录路径\"}]", + "example": "" + }, + "sort": { + "type": "integer", + "description": "排序", + "example": 0 + } + }, + "required": [ + "group_id", + "label", + "cmd" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/vnc_command/item/update": { + "post": { + "summary": "修改指令项", + "deprecated": false, + "description": "", + "operationId": "VncCommandItemUpdate", + "tags": [ + "VNC指令管理" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "指令项ID", + "example": 0 + }, + "label": { + "type": "string", + "example": "" + }, + "cmd": { + "type": "string", + "example": "" + }, + "vars": { + "type": "string", + "example": "" + }, + "sort": { + "type": "integer", + "example": 0 + } + }, + "required": [ + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "修改成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/server/vnc_command/item/delete": { + "delete": { + "summary": "删除指令项", + "deprecated": false, + "description": "", + "operationId": "VncCommandItemDelete", + "tags": [ + "VNC指令管理" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/volume/list": { + "get": { + "summary": "获取虚拟机数据卷列表", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Volume" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/volume/detail": { + "get": { + "summary": "获取数据卷详情", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Volume" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "volume_id", + "in": "query", + "description": "数据卷 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/volume/create": { + "post": { + "summary": "创建数据卷", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "name": { + "type": "string", + "description": "数据卷名称", + "example": "" + }, + "size": { + "type": "integer", + "format": "int64", + "description": "大小(GB)", + "example": 0 + }, + "target_device": { + "type": "string", + "description": "目标设备名", + "example": "" + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/volume/resize": { + "post": { + "summary": "扩容数据卷", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "volume_id": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "size": { + "type": "integer", + "format": "int64", + "description": "新大小(GB)", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "volume_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/volume/mount": { + "post": { + "summary": "挂载数据卷", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "volume_id": { + "type": "integer", + "format": "int64", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "volume_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/volume/unmount": { + "post": { + "summary": "卸载数据卷", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Volume" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "volume_id": { + "type": "integer", + "format": "int64", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "volume_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/volume/delete": { + "delete": { + "summary": "删除数据卷", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Volume" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "volume_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/snapshot/list": { + "get": { + "summary": "获取虚拟机快照列表", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Snapshot" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/snapshot/create": { + "post": { + "summary": "创建快照", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Snapshot" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "name": { + "type": "string", + "description": "快照名称", + "example": "" + }, + "description": { + "type": "string", + "description": "快照描述", + "example": "" + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/snapshot/restore": { + "post": { + "summary": "恢复快照", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Snapshot" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "snapshot_id": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "name": { + "type": "string", + "example": "" + } + }, + "required": [ + "user_goods_id", + "snapshot_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/snapshot/delete": { + "post": { + "summary": "删除快照", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Snapshot" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "snapshot_id": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "name": { + "type": "string", + "example": "" + } + }, + "required": [ + "user_goods_id", + "snapshot_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/snapshot/progress": { + "get": { + "summary": "获取快照任务进度", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Snapshot" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "task_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/snapshot/count": { + "get": { + "summary": "获取快照数量", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Snapshot" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/snapshot/set_limit": { + "post": { + "summary": "设置快照上限", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Snapshot" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "limit": { + "type": "integer", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "limit" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/backup/list": { + "get": { + "summary": "获取虚拟机备份列表", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Backup" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/backup/create": { + "post": { + "summary": "创建备份", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Backup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "name": { + "type": "string", + "example": "" + }, + "description": { + "type": "string", + "example": "" + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/backup/restore": { + "post": { + "summary": "恢复备份", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Backup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "backup_id": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "name": { + "type": "string", + "example": "" + } + }, + "required": [ + "user_goods_id", + "backup_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/backup/delete": { + "post": { + "summary": "删除备份", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Backup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "backup_id": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "name": { + "type": "string", + "example": "" + } + }, + "required": [ + "user_goods_id", + "backup_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/backup/progress": { + "get": { + "summary": "获取备份任务进度", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Backup" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "task_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/backup/count": { + "get": { + "summary": "获取备份数量", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Backup" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/backup/set_limit": { + "post": { + "summary": "设置备份上限", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Backup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "limit": { + "type": "integer", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "limit" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/list": { + "get": { + "summary": "获取虚拟机安全组列表", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "keyword", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/detail": { + "get": { + "summary": "获取安全组详情", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/create": { + "post": { + "summary": "创建安全组", + "deprecated": false, + "description": "通过 user_goods_id 确定服务,自动从虚拟机系统卷获取宿主机ID,使用 UserGoods 的 UserId", + "tags": [ + "admin-用户虚拟机-安全组" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品ID", + "example": 0 + }, + "name": { + "type": "string", + "description": "安全组名称", + "example": "" + }, + "direction": { + "type": "string", + "description": "方向描述", + "example": "" + }, + "lock": { + "type": "boolean", + "description": "是否锁定", + "default": false, + "example": "false" + }, + "drop_all": { + "type": "boolean", + "description": "是否丢弃所有", + "default": false, + "example": "false" + } + }, + "required": [ + "user_goods_id", + "name" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/update": { + "post": { + "summary": "修改安全组", + "deprecated": false, + "description": "", + "tags": [ + "admin-用户虚拟机-安全组" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品ID", + "example": 0 + }, + "id": { + "type": "integer", + "description": "安全组ID", + "example": 0 + }, + "name": { + "type": "string", + "description": "安全组名称(可选)", + "example": "" + }, + "direction": { + "type": "string", + "description": "方向描述(可选)", + "example": "" + }, + "lock": { + "type": "boolean", + "description": "是否锁定(可选)", + "example": "" + }, + "drop_all": { + "type": "boolean", + "description": "是否丢弃所有(可选)", + "example": "" + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/bind": { + "post": { + "summary": "绑定安全组到虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "id": { + "type": "integer", + "description": "安全组 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/unbind": { + "post": { + "summary": "解绑安全组", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "id": { + "type": "integer", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/apply": { + "post": { + "summary": "应用安全组", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "id": { + "type": "integer", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/set_shared": { + "post": { + "summary": "设置安全组共享", + "deprecated": false, + "description": "", + "tags": [ + "admin-用户虚拟机-安全组" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品ID", + "example": 0 + }, + "id": { + "type": "integer", + "description": "安全组ID", + "example": 0 + }, + "shared": { + "type": "boolean", + "description": "是否共享", + "example": "" + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/delete": { + "delete": { + "summary": "删除安全组", + "deprecated": false, + "description": "", + "tags": [ + "admin-用户虚拟机-安全组" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "安全组ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/enable_whitelist": { + "post": { + "summary": "启用安全组白名单", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "id": { + "type": "integer", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/disable_whitelist": { + "post": { + "summary": "禁用安全组白名单", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "id": { + "type": "integer", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/update_rule": { + "post": { + "summary": "修改安全组规则", + "deprecated": false, + "description": "", + "tags": [ + "admin-用户虚拟机-安全组" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品ID", + "example": 0 + }, + "id": { + "type": "integer", + "description": "规则ID", + "example": 0 + }, + "port_group_id": { + "type": "integer", + "description": "安全组ID", + "example": 0 + }, + "priority": { + "type": "integer", + "description": "优先级", + "example": 0 + }, + "protocol": { + "type": "string", + "description": "协议", + "example": "" + }, + "action": { + "type": "string", + "description": "动作(allow/drop)", + "example": "" + }, + "port_range": { + "type": "string", + "description": "端口范围", + "example": "" + }, + "ip_range": { + "type": "string", + "description": "IP范围", + "example": "" + } + }, + "required": [ + "user_goods_id", + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/create_rule": { + "post": { + "summary": "创建安全组规则", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "group_id": { + "type": "integer", + "example": 0 + }, + "priority": { + "type": "integer", + "example": 0 + }, + "protocol": { + "type": "string", + "example": "" + }, + "action": { + "type": "string", + "example": "" + }, + "port_range": { + "type": "string", + "example": "" + }, + "ip_range": { + "type": "string", + "example": "" + } + }, + "required": [ + "user_goods_id", + "group_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/delete_rule": { + "delete": { + "summary": "删除安全组规则", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-PostGroup" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "description": "规则 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/post_group/user_list": { + "get": { + "summary": "获取用户安全组列表", + "deprecated": false, + "description": "通过 user_goods_id 确定服务和用户,查询该用户拥有的安全组列表", + "tags": [ + "admin-用户虚拟机-安全组" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品ID(用于确定 service 和 user)", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "页码,默认 1", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "page_size", + "in": "query", + "description": "每页数量,默认 20", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "keyword", + "in": "query", + "description": "搜索关键词", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "安全组列表", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "lock": { + "type": "boolean" + }, + "drop_all": { + "type": "boolean" + }, + "shared": { + "type": "boolean" + }, + "user_id": { + "type": "integer" + } + } + } + }, + "total": { + "type": "integer" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/network/list": { + "get": { + "summary": "获取网络列表", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Network" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "ip_version", + "in": "query", + "description": "ipv4 \\ ipv6", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词筛选", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/network/detail": { + "get": { + "summary": "获取网络详情", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Network" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "network_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/network/list_by_host": { + "get": { + "summary": "通过宿主机ID获取网络列表", + "deprecated": false, + "description": "直接传入 KVM 服务ID和宿主机ID查询网络列表,替代原 list_by_good 接口", + "operationId": "NetworkListByHost", + "tags": [ + "Admin.UserVm.Network" + ], + "parameters": [ + { + "name": "service_id", + "in": "query", + "description": "KVM服务ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "host_id", + "in": "query", + "description": "宿主机ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "页码", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "ip_version", + "in": "query", + "description": "IP版本筛选", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ipv4", + "ipv6" + ] + } + }, + { + "name": "key", + "in": "query", + "description": "搜索关键字", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功返回网络列表", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "meta": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "count": { + "type": "integer" + } + } + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/networking/list": { + "get": { + "summary": "获取用户组网列表", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Networking" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/networking/detail": { + "get": { + "summary": "获取用户组网详情", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Networking" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "networking_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/networking/create": { + "post": { + "summary": "创建用户组网", + "deprecated": false, + "description": "管理员通过 user_goods_id 创建用户组网,自动从虚拟机系统卷获取宿主机ID", + "tags": [ + "admin-用户虚拟机-组网" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品ID", + "example": 0 + }, + "name": { + "type": "string", + "description": "组网名称", + "example": "" + }, + "description": { + "type": "string", + "description": "组网描述", + "example": "" + }, + "bridge_name": { + "type": "string", + "description": "网桥名称", + "example": "" + }, + "gateway": { + "type": "string", + "description": "网关地址", + "example": "" + } + }, + "required": [ + "user_goods_id" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/networking/assign": { + "post": { + "summary": "分配组网 IP 到虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Networking" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "networking_id": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "ip": { + "type": "string", + "description": "指定 IP(可选)", + "example": "" + } + }, + "required": [ + "user_goods_id", + "networking_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/networking/remove_network": { + "post": { + "summary": "移除组网网络", + "deprecated": false, + "description": "", + "tags": [ + "UserVm-Networking" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "example": 0 + }, + "networking_id": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "network_id": { + "type": "integer", + "format": "int64", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "networking_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/networking/delete": { + "delete": { + "summary": "删除用户组网", + "deprecated": false, + "description": "", + "tags": [ + "admin-用户虚拟机-组网" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "networking_id", + "in": "query", + "description": "", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/list": { + "get": { + "summary": "获取用户虚拟机列表", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "page", + "in": "query", + "description": "页码", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "user_id", + "in": "query", + "description": "按用户 ID 筛选", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词搜索(按商品名称模糊匹配)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "description": "筛选虚拟机状态", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGoods" + } + }, + "all_count": { + "type": "integer" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/detail": { + "get": { + "summary": "获取用户虚拟机详情", + "deprecated": false, + "description": "返回 UserGoods 信息,若已绑定虚拟机则同时返回远程虚拟机详情", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_goods": { + "$ref": "#/components/schemas/UserGoods" + }, + "vm": { + "type": "object", + "description": "远程虚拟机详情(未绑定时无此字段)", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/vnc": { + "get": { + "summary": "获取虚拟机VNC连接", + "deprecated": false, + "description": "通过 user_goods_id 获取虚拟机的 VNC 远程连接地址", + "tags": [ + "admin-用户虚拟机" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "VNC连接地址" + }, + "expire_at": { + "type": "string", + "format": "date-time", + "description": "连接过期时间" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/host_images": { + "get": { + "summary": "获取可用的镜像列表", + "deprecated": false, + "description": "通过 user_goods_id 获取对应虚拟机所在宿主机上已同步完成的镜像列表。先获取VM详情,从系统卷中提取宿主机ID,再对比宿主机镜像同步状态,仅返回 synced 状态的镜像。", + "tags": [ + "admin-用户虚拟机" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "host_id": { + "type": "integer", + "description": "宿主机ID" + }, + "total": { + "type": "integer", + "description": "已完成镜像数量" + }, + "data": { + "type": "array", + "description": "已完成(synced)的镜像列表", + "items": { + "type": "object", + "properties": { + "image": { + "type": "object", + "description": "镜像信息", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "os_type": { + "type": "string" + }, + "type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "desc": { + "type": "string" + } + } + }, + "sync_status": { + "type": "string", + "description": "同步状态(synced)", + "example": "synced" + }, + "host_status": { + "type": "string", + "description": "宿主机侧镜像状态" + } + } + } + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/create": { + "post": { + "summary": "创建用户虚拟机(同时创建 UserGoods)", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "type": "integer", + "description": "商品 ID(必须为云服务器类型)", + "example": 0 + }, + "order_id": { + "type": "integer", + "description": "订单id", + "example": 0 + }, + "user_id": { + "type": "integer", + "description": "用户 ID", + "example": 0 + }, + "name": { + "type": "string", + "description": "虚拟机名称", + "example": "" + }, + "memory": { + "type": "integer", + "format": "int64", + "description": "内存(KiB)", + "example": 0 + }, + "vcpu": { + "type": "integer", + "format": "int64", + "description": "虚拟CPU数", + "example": 0 + }, + "system_size": { + "type": "integer", + "format": "int64", + "description": "系统盘大小(GB)", + "example": 0 + }, + "rx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "下行带宽", + "example": 0 + }, + "tx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "上行带宽", + "example": 0 + }, + "image_id": { + "type": "integer", + "format": "int64", + "description": "镜像 ID", + "example": 0 + }, + "host_id": { + "type": "integer", + "format": "int64", + "description": "指定宿主机 ID", + "example": 0 + }, + "host_group_id": { + "type": "integer", + "format": "int64", + "description": "指定宿主机组 ID(不传则使用商品绑定的主机组)", + "example": 0 + }, + "ipv4_num": { + "type": "integer", + "format": "int64", + "description": "IPv4 IP数量", + "example": 0 + }, + "ipv6_num": { + "description": "IPv6 IP数量", + "example": 0, + "type": "integer" + }, + "network_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "网络 ID 列表", + "example": "" + }, + "snapshot_num": { + "type": "integer", + "description": "快照上限", + "example": 0 + }, + "backup_num": { + "type": "integer", + "description": "备份上限", + "example": 0 + }, + "renew_price": { + "type": "integer", + "description": "续费价格", + "example": 0 + }, + "base_price": { + "type": "integer", + "description": "基础价格", + "example": 0 + }, + "note": { + "type": "string", + "description": "备注", + "example": "" + }, + "expire_time": { + "type": "string", + "description": "到期时间,格式:2006-01-02 15:04:05", + "example": "" + }, + "data_volume_size": { + "type": "integer", + "description": "额外数据卷大小(GB)", + "example": 0 + } + }, + "required": [ + "good_id", + "user_id", + "memory", + "vcpu", + "system_size", + "image_id" + ] + }, + "examples": {} + } + } + }, + "responses": { + "200": { + "description": "创建成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "user_goods": { + "$ref": "#/components/schemas/UserGoods" + }, + "vm": { + "type": "object", + "description": "创建的虚拟机信息", + "properties": {} + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/bind": { + "post": { + "summary": "绑定虚拟机到 UserGoods", + "deprecated": false, + "description": "将一个未绑定的 UserGoods 绑定到一个已存在的虚拟机", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "vm_id": { + "type": "integer", + "description": "虚拟机 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "vm_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "绑定成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/transfer": { + "post": { + "summary": "转移用户虚拟机", + "deprecated": false, + "description": "将用户虚拟机的 UserGoods 归属权转移至目标用户", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "target_user_id": { + "type": "integer", + "description": "目标用户 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "target_user_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "转移成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/migrate": { + "post": { + "summary": "迁移虚拟机(更换宿主机)", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "target_host_id": { + "type": "integer", + "format": "int64", + "description": "目标宿主机 ID(与 target_host_group_id 二选一)", + "example": 0 + }, + "target_host_group_id": { + "type": "integer", + "format": "int64", + "description": "目标宿主机组 ID", + "example": 0 + }, + "ipv4_num": { + "type": "integer", + "format": "int64", + "description": "新分配的IPv4数量(不传保持原数量)", + "example": 0 + }, + "ipv6_num": { + "description": "新分配的IPv6数量(不传保持原数量)", + "example": 0, + "type": "integer" + } + }, + "required": [ + "user_goods_id" + ] + } + } + } + }, + "responses": { + "200": { + "description": "迁移成功", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MigrateVMReply" + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/update_traffic": { + "post": { + "summary": "修改虚拟机带宽", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "rx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "下行带宽", + "example": 0 + }, + "tx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "上行带宽", + "example": 0 + }, + "traffic_max": { + "type": "integer", + "format": "int64", + "description": "流量上限", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/update": { + "post": { + "summary": "修改虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "rx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "下行带宽", + "example": 0 + }, + "tx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "上行带宽", + "example": 0 + }, + "root_password": { + "type": "string", + "description": "root 密码", + "example": "" + }, + "ssh_port": { + "type": "integer", + "format": "int64", + "description": "SSH 端口", + "example": 0 + }, + "internet_network_id": { + "type": "integer", + "format": "int64", + "description": "内网网络 ID", + "example": 0 + }, + "network_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "公网网络id列表", + "example": "" + }, + "port_group_id": { + "type": "integer", + "format": "int64", + "description": "安全组 ID", + "example": 0 + }, + "snapshot_num": { + "type": "integer", + "description": "快照上限", + "example": 0 + }, + "backup_num": { + "type": "integer", + "description": "备份上限", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/refactor": { + "post": { + "summary": "重构虚拟机", + "deprecated": false, + "description": "修改虚拟机的核心配置(CPU/内存/网络/密码等),相当于重新定义虚拟机规格", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "memory": { + "type": "integer", + "format": "int64", + "description": "内存(KiB)", + "example": 0 + }, + "vcpu": { + "type": "integer", + "format": "int64", + "description": "虚拟CPU数", + "example": 0 + }, + "rx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "下行带宽", + "example": 0 + }, + "tx_bandwidth": { + "type": "integer", + "format": "int64", + "description": "上行带宽", + "example": 0 + }, + "root_password": { + "type": "string", + "description": "root 密码", + "example": "" + }, + "uuid": { + "type": "string", + "description": "UUID", + "example": "" + }, + "mate_data_id": { + "type": "string", + "description": "元数据 ID", + "example": "" + }, + "physical_name": { + "type": "string", + "description": "物理名称", + "example": "" + }, + "config_path": { + "type": "string", + "description": "配置路径", + "example": "" + }, + "ssh_port": { + "type": "integer", + "format": "int64", + "description": "SSH 端口", + "example": 0 + }, + "vnc_port": { + "type": "integer", + "format": "int64", + "description": "VNC 端口", + "example": 0 + }, + "vnc_password": { + "type": "string", + "description": "VNC 密码", + "example": "" + }, + "internet_network_id": { + "type": "integer", + "format": "int64", + "description": "公网网络 ID", + "example": 0 + }, + "port_group_id": { + "type": "integer", + "format": "int64", + "description": "安全组 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/start": { + "post": { + "summary": "启动虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/stop": { + "post": { + "summary": "停止虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/reboot": { + "post": { + "summary": "重启虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/suspend": { + "post": { + "summary": "暂停虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/resume": { + "post": { + "summary": "恢复虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/rescue": { + "post": { + "summary": "救援虚拟机", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/exit_rescue": { + "post": { + "summary": "退出救援模式", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/rebuild": { + "post": { + "summary": "重装虚拟机系统", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "image_id": { + "type": "integer", + "format": "int64", + "description": "新镜像 ID", + "example": 0 + } + }, + "required": [ + "user_goods_id", + "image_id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "操作成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/delete": { + "delete": { + "summary": "删除用户虚拟机(同时删除远程VM和UserGoods)", + "deprecated": false, + "description": "", + "tags": [ + "UserVm" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/metrics_history": { + "get": { + "summary": "获取用户虚拟机历史指标", + "deprecated": false, + "description": "", + "operationId": "GetUserVmMetricsHistory", + "tags": [ + "Admin.UserVm" + ], + "parameters": [ + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "start", + "in": "query", + "description": "开始时间(RFC3339格式)", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "end_time", + "in": "query", + "description": "结束时间(RFC3339格式)", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "interval", + "in": "query", + "description": "聚合粒度(1m, 5m, 1h),默认 1m", + "required": false, + "schema": { + "type": "string", + "default": "1m" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功返回历史指标数据", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "array", + "description": "历史指标数据数组", + "items": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_vm/good_host_group_images": { + "get": { + "summary": "通过商品ID获取镜像列表", + "deprecated": false, + "description": "", + "operationId": "GetGoodHostGroupImages", + "tags": [ + "Admin.UserVm" + ], + "parameters": [ + { + "name": "good_id", + "in": "query", + "description": "商品ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功返回镜像列表", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "host_group_id": { + "type": "integer", + "description": "远端服务侧宿主机组ID" + }, + "data": { + "type": "array", + "description": "镜像列表", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "镜像ID" + }, + "name": { + "type": "string", + "description": "镜像名称" + }, + "os_type": { + "type": "string", + "description": "操作系统类型" + }, + "type": { + "type": "string", + "description": "镜像类型" + }, + "status": { + "type": "string", + "description": "镜像状态" + }, + "description": { + "type": "string", + "description": "镜像描述" + }, + "size": { + "type": "integer", + "description": "镜像大小" + } + } + } + }, + "meta": { + "type": "object", + "description": "分页元信息", + "properties": { + "total": { + "type": "integer" + }, + "page": { + "type": "integer" + }, + "count": { + "type": "integer" + } + } + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_goods/list": { + "get": { + "summary": "获取用户商品列表", + "deprecated": false, + "description": "", + "tags": [ + "UserGoods" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "页码", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "每页数量", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "user_id", + "in": "query", + "description": "按用户 ID 筛选", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "good_id", + "in": "query", + "description": "按商品 ID 筛选", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "key", + "in": "query", + "description": "关键词搜索(按商品名称模糊匹配)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "筛选用户商品tag", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserGoods" + } + }, + "all_count": { + "type": "integer", + "description": "总数" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_goods/detail": { + "get": { + "summary": "获取用户商品详情", + "deprecated": false, + "description": "", + "tags": [ + "UserGoods" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "用户商品 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserGoods" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_goods/create": { + "post": { + "summary": "新增用户商品", + "deprecated": false, + "description": "", + "tags": [ + "UserGoods" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "good_id": { + "type": "integer", + "description": "商品 ID", + "example": 0 + }, + "user_id": { + "type": "integer", + "description": "用户 ID", + "example": 0 + }, + "order_id": { + "type": "integer", + "description": "订单 ID", + "example": 0 + }, + "good_plan_id": { + "type": "integer", + "description": "商品套餐 ID", + "example": 0 + }, + "item_id": { + "type": "integer", + "description": "归属项 ID", + "example": 0 + }, + "renew_price": { + "type": "integer", + "description": "续费价格", + "example": 0 + }, + "base_price": { + "type": "integer", + "description": "基础价格", + "example": 0 + }, + "note": { + "type": "string", + "description": "备注说明", + "example": "" + }, + "expire_time": { + "type": "string", + "description": "到期时间,格式:2006-01-02 15:04:05", + "example": "" + }, + "order_args": { + "description": "订单参数 json", + "example": "", + "type": "string" + } + }, + "required": [ + "good_id", + "user_id" + ] + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserGoods" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_goods/update": { + "post": { + "summary": "修改用户商品", + "deprecated": false, + "description": "", + "tags": [ + "UserGoods" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "用户商品 ID", + "example": 0 + }, + "note": { + "type": "string", + "description": "备注说明", + "example": "" + }, + "renew_price": { + "type": "integer", + "description": "续费价格", + "example": 0 + }, + "base_price": { + "type": "integer", + "description": "基础价格", + "example": 0 + }, + "expire_time": { + "type": "string", + "description": "到期时间,格式:2006-01-02 15:04:05", + "example": "" + }, + "item_id": { + "type": "integer", + "description": "归属项 ID", + "example": 0 + } + }, + "required": [ + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "修改成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserGoods" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_goods/delete": { + "delete": { + "summary": "删除用户商品", + "deprecated": false, + "description": "", + "tags": [ + "UserGoods" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "用户商品 ID", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_goods/expire_remind/list": { + "get": { + "summary": "获取到期提醒记录列表 Copy", + "deprecated": false, + "description": "分页查询用户商品到期提醒发送记录,支持按用户商品ID和用户ID筛选", + "operationId": "GetExpireReminderList", + "tags": [ + "Admin.UserGoods.ExpireRemind" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "description": "页码,默认1", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "count", + "in": "query", + "description": "每页数量,默认10", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + }, + { + "name": "user_goods_id", + "in": "query", + "description": "用户商品ID,按指定用户商品筛选", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "user_id", + "in": "query", + "description": "用户ID,按指定用户筛选", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "responses": { + "200": { + "description": "成功返回提醒记录列表", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "提醒记录列表", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "记录ID" + }, + "userGoodsId": { + "type": "integer", + "description": "用户商品ID" + }, + "userGoods": { + "type": "object", + "description": "关联的用户商品信息", + "properties": {} + }, + "userId": { + "type": "integer", + "description": "用户ID" + }, + "user": { + "type": "object", + "description": "关联的用户信息", + "properties": {} + }, + "type": { + "type": "string", + "enum": [ + "pre_expire", + "on_expire", + "manual" + ], + "description": "提醒类型:pre_expire(到期前提醒)、on_expire(到期时提醒)、manual(手动提醒)" + }, + "method": { + "type": "string", + "enum": [ + "email", + "sms" + ], + "description": "提醒方式:email(邮件)、sms(短信)" + }, + "success": { + "type": "boolean", + "description": "是否发送成功" + }, + "note": { + "type": "string", + "description": "提醒说明(失败时为错误信息)" + }, + "CreatedAt": { + "type": "string", + "format": "date-time", + "description": "发送时间" + } + } + } + }, + "all_count": { + "type": "integer", + "description": "总记录数" + } + } + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/v1/admin/good/user_goods/expire_remind/send": { + "post": { + "summary": "手动发送到期提醒 Copy", + "deprecated": false, + "description": "管理员手动对指定用户商品发送到期提醒通知,不受每日去重限制", + "operationId": "SendExpireRemind", + "tags": [ + "Admin.UserGoods.ExpireRemind" + ], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "", + "example": "Bearer {{token}}", + "schema": { + "type": "string", + "default": "Bearer {{token}}" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "user_goods_id" + ], + "properties": { + "user_goods_id": { + "type": "integer", + "description": "用户商品ID(必填)" + }, + "method": { + "type": "string", + "enum": [ + "email", + "sms", + "all" + ], + "default": "all", + "description": "提醒方式:email(仅邮件)、sms(仅短信)、all(全部),默认all" + } + } + }, + "examples": {} + } + }, + "required": true + }, + "responses": { + "200": { + "description": "发送成功", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "string", + "description": "成功提示信息" + } + } + } + } + }, + "headers": {} + }, + "400": { + "description": "参数错误或发送失败", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "msg": { + "type": "string", + "description": "错误信息" + } + } + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, "/api/v1/admin/server/web_routs/permission/list": { "get": { "summary": "获取后台菜单权限列表", @@ -645,6 +26308,152 @@ }, "components": { "schemas": { + "Success": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Success" + }, + "data": { + "type": "object", + "properties": {} + }, + "error": { + "type": "string" + } + } + }, + "SuccessResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "success" + }, + "data": { + "type": "object", + "properties": {} + } + } + }, + "UserNetworkingData": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "user_id": { + "type": "integer", + "format": "int64" + }, + "host_id": { + "type": "integer", + "format": "int64" + }, + "bridge_name": { + "type": "string" + }, + "gateway": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + }, + "MigrateVMReply": { + "type": "object", + "properties": { + "old_vm": { + "type": "object", + "description": "原虚拟机信息", + "properties": {} + }, + "new_vm": { + "type": "object", + "description": "新虚拟机信息", + "properties": {} + }, + "task": { + "type": "object", + "description": "创建任务", + "properties": {} + } + } + }, + "UserGoods": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "goodId": { + "type": "integer" + }, + "good": { + "type": "object", + "properties": {} + }, + "tag": { + "type": "string" + }, + "userId": { + "type": "integer" + }, + "user": { + "type": "object", + "properties": {} + }, + "orderId": { + "type": "integer" + }, + "order": { + "type": "object", + "properties": {} + }, + "expireTime": { + "type": "string", + "format": "date-time" + }, + "note": { + "type": "string" + }, + "goodPlanId": { + "type": "integer" + }, + "itemId": { + "type": "integer", + "description": "虚拟机 ID" + }, + "renewPrice": { + "type": "integer" + }, + "basePrice": { + "type": "integer" + } + } + }, "AdminWebRouts": { "type": "object", "properties": { @@ -722,6 +26531,24 @@ } } }, + "NetworkingNetworkItem": { + "type": "object", + "properties": { + "network": { + "$ref": "#/components/schemas/Network" + }, + "vm_id": { + "type": "integer", + "format": "int64" + }, + "vm_name": { + "type": "string" + }, + "vm_status": { + "type": "string" + } + } + }, "AdminWebRoutsPermission": { "type": "object", "properties": { @@ -758,10 +26585,87 @@ "format": "date-time" } } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string" + }, + "error": { + "type": "string" + } + } + }, + "Network": { + "type": "object", + "description": "网络对象(来自 gRPC Network message)", + "properties": {} + }, + "Task": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "task_id": { + "type": "string", + "description": "Celery 任务 ID" + }, + "name": { + "type": "string", + "description": "任务名称" + }, + "status": { + "type": "string", + "enum": [ + "pending", + "running", + "success", + "failed", + "canceled" + ] + }, + "tag": { + "type": "string", + "description": "任务标签(TaskTags 枚举)" + }, + "message": { + "type": "string" + }, + "logs": { + "type": "array", + "items": { + "type": "string" + } + }, + "host_id": { + "type": "integer", + "format": "int64" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } } }, "responses": {}, - "securitySchemes": {} + "securitySchemes": { + "bearer": { + "type": "http", + "scheme": "bearer" + } + } }, "servers": [], "security": []