magic-api数据库存储方案

建表语句

drop table if exists magic_api_file;
CREATE TABLE `magic_api_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file_path` varchar(512) NOT NULL,
  `file_content` mediumtext,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `magic_api_file_file_path_IDX` (`file_path`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4

导入接口数据到这个表后,点击右上角刷新按钮即可!!!

复制代码
INSERT INTO magic_api_file (file_path,file_content) VALUES 
('/magic-api/api/','this is directory')
,('/magic-api/api/a/','this is directory')
,('/magic-api/api/a/group.json','{
  "properties" : { },
  "id" : "f344e4858ed54c37a825d32742c60a96",
  "name" : "a",
  "type" : "api",
  "parentId" : "0",
  "path" : null,
  "createTime" : 1673841678851,
  "updateTime" : null,
  "createBy" : null,
  "updateBy" : null,
  "paths" : [ ],
  "options" : [ ]
}')
,('/magic-api/api/a/hello.ms','{
  "properties" : { },
  "id" : "00cab53619f244168e44fa59137eb3fc",
  "script" : null,
  "groupId" : "f344e4858ed54c37a825d32742c60a96",
  "name" : "hello",
  "createTime" : 1673841689882,
  "updateTime" : null,
  "lock" : null,
  "createBy" : null,
  "updateBy" : null,
  "path" : "hello",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : null,
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : null,
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
return ''Hello magic-api''')
,('/magic-api/datasource/','this is directory')
,('/magic-api/function/','this is directory')
;
复制代码

 

posted @   wujf  阅读(1323)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
历史上的今天:
2018-01-16 解决spring boot websocket
点击右上角即可分享
微信分享提示