R
R
Rocket-API
Search…
mysql
1
CREATE TABLE `api_info` (
2
`id` varchar(45) NOT NULL,
3
`method` varchar(45) DEFAULT NULL,
4
`path` varchar(100) DEFAULT NULL,
5
`type` varchar(5) DEFAULT NULL COMMENT '类型:CODE,QL',
6
`service` varchar(45) DEFAULT NULL,
7
`editor` varchar(45) DEFAULT NULL,
8
`name` varchar(200) DEFAULT NULL,
9
`datasource` varchar(45) DEFAULT NULL,
10
`script` text,
11
`options` text,
12
`create_time` varchar(45) DEFAULT NULL,
13
`full_path` varchar(200) DEFAULT NULL,
14
`directory_id` varchar(45) DEFAULT NULL,
15
`update_time` varchar(45) DEFAULT NULL,
16
PRIMARY KEY (`id`),
17
UNIQUE KEY `unique_path_method` (`service`,`full_path`,`method`)
18
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='路径明细';
19
20
21
CREATE TABLE `api_info_history` (
22
`id` varchar(45) NOT NULL,
23
`api_info_id` varchar(45) NOT NULL,
24
`method` varchar(45) DEFAULT NULL,
25
`path` varchar(100) DEFAULT NULL,
26
`type` varchar(5) DEFAULT NULL COMMENT '类型:CODE,QL',
27
`service` varchar(45) DEFAULT NULL,
28
`editor` varchar(45) DEFAULT NULL,
29
`name` varchar(200) DEFAULT NULL,
30
`datasource` varchar(45) DEFAULT NULL,
31
`script` text,
32
`options` text,
33
`create_time` varchar(45) DEFAULT NULL,
34
`full_path` varchar(200) DEFAULT NULL,
35
`directory_id` varchar(45) DEFAULT NULL,
36
PRIMARY KEY (`id`)
37
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='路径明细历史';
38
39
40
CREATE TABLE `api_example` (
41
`id` varchar(45) NOT NULL,
42
`api_info_id` varchar(45) NOT NULL,
43
`method` varchar(45) DEFAULT NULL,
44
`url` text,
45
`request_header` text,
46
`request_body` text,
47
`response_header` text,
48
`response_body` text,
49
`status` varchar(10) DEFAULT NULL,
50
`elapsed_time` int(11) DEFAULT NULL,
51
`options` text,
52
`editor` varchar(45) DEFAULT NULL,
53
`create_time` varchar(45) DEFAULT NULL,
54
PRIMARY KEY (`id`),
55
KEY `index_api_id` (`api_info_id`)
56
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模拟数据';
57
58
//在开启了spring.rocket-api.config-enabled=true才需要
59
CREATE TABLE `api_config` (
60
`id` varchar(45) NOT NULL,
61
`service` varchar(45) NOT NULL,
62
`config_context` text,
63
`type` VARCHAR(45) NULL,
64
PRIMARY KEY (`id`),
65
UNIQUE KEY `key_UNIQUE` (`id`)
66
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
67
68
69
CREATE TABLE `api_directory` (
70
`id` varchar(45) NOT NULL,
71
`name` varchar(45) DEFAULT NULL,
72
`path` varchar(200) DEFAULT NULL,
73
`parent_id` varchar(45) DEFAULT NULL,
74
`service` varchar(45) DEFAULT NULL,
75
PRIMARY KEY (`id`)
76
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
77
Copied!
Last modified 2mo ago
Copy link