robot.sql 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. create database if not exists ai_oqas;
  2. use ai_oqas;
  3. drop table if exists operate_log;
  4. create table operate_log
  5. (
  6. id varchar(32) not null comment '自增主键',
  7. operation varchar(128) comment '操作详情',
  8. clazz varchar(128) comment '方法所属类名',
  9. method varchar(128) comment '调用方法',
  10. params varchar(1024) comment '方法参数',
  11. start varchar(32) comment '开始执行时间',
  12. end varchar(32) comment '结束执行时间',
  13. consume bigint comment '耗时',
  14. remark varchar(256) comment '备注信息',
  15. operator varchar(32) comment '操作人',
  16. operator_id varchar(32) comment '操作人id',
  17. operate_time varchar(32) comment '操作日期',
  18. operate_ip varchar(32) comment '操作ip',
  19. primary key (id)
  20. )
  21. engine = InnoDB
  22. default charset = utf8;
  23. drop table if exists robot;
  24. create table robot
  25. (
  26. id varchar(32) not null comment '机器人id',
  27. group_id varchar(32) comment '机器人所属组id',
  28. field_id varchar(32) comment '机器人所属领域id',
  29. name varchar(32) comment '机器人名称',
  30. faq_file varchar(256) comment '机器人训练用的问答对数据集',
  31. tree_file varchar(256) comment '机器人训练用的树结构数据集',
  32. graph_file varchar(256) comment '机器人训练用的图结构数据集',
  33. config_id varchar(32) comment '机器人配置id',
  34. status varchar(32) comment '机器人状态',
  35. version int comment '机器人版本号',
  36. remark varchar(256) comment '备注信息',
  37. deleted boolean comment '机器人是否被删除',
  38. can_deleted boolean comment '机器人是否可被删除',
  39. create_time varchar(32) comment '机器人创建时间',
  40. primary key (id)
  41. )
  42. engine = InnoDB
  43. default charset = utf8;
  44. drop table if exists robot_user;
  45. create table robot_user
  46. (
  47. id varchar(32) not null comment '主键',
  48. robot_id varchar(32) not null comment '机器人id',
  49. user_id varchar(32) not null comment '用户id',
  50. primary key (id)
  51. )
  52. engine = InnoDB
  53. default charset = utf8;
  54. drop table if exists robot_field;
  55. create table robot_field
  56. (
  57. id varchar(32) not null comment '主键',
  58. parent_id varchar(32) comment '父节点id',
  59. name varchar(32) comment '领域名称',
  60. remark varchar(256) comment '备注',
  61. deleted boolean comment '是否被弃用',
  62. create_time varchar(32) comment '创建日期',
  63. primary key (id)
  64. )
  65. engine = InnoDB
  66. default charset = utf8;
  67. INSERT INTO ai_oqas.robot_field (id, parent_id, name, remark, deleted, create_time)
  68. VALUES ('1189002586471149569', null, '教育', null, 0, '2019-10-29 10:14:41');
  69. INSERT INTO ai_oqas.robot_field (id, parent_id, name, remark, deleted, create_time)
  70. VALUES ('1189002587830104066', null, '物流', null, 0, '2019-10-29 10:14:42');
  71. INSERT INTO ai_oqas.robot_field (id, parent_id, name, remark, deleted, create_time)
  72. VALUES ('1189002587855269889', null, '医疗', null, 0, '2019-10-29 10:14:42');
  73. INSERT INTO ai_oqas.robot_field (id, parent_id, name, remark, deleted, create_time)
  74. VALUES ('1189002587872047106', null, '企业', null, 0, '2019-10-29 10:14:42');
  75. INSERT INTO ai_oqas.robot_field (id, parent_id, name, remark, deleted, create_time)
  76. VALUES ('1189002587893018626', null, '闲聊', null, 0, '2019-10-29 10:14:42');
  77. INSERT INTO ai_oqas.robot_field (id, parent_id, name, remark, deleted, create_time)
  78. VALUES ('1189002587909795841', null, '其他', null, 0, '2019-10-29 10:14:42');
  79. drop table if exists config;
  80. create table config
  81. (
  82. id varchar(32) not null comment '主键',
  83. name varchar(32) comment '领域名称',
  84. value varchar(128) comment '值',
  85. remark varchar(256) comment '备注',
  86. deleted boolean comment '是否被弃用',
  87. create_time varchar(32) comment '创建日期',
  88. primary key (id)
  89. )
  90. engine = InnoDB
  91. default charset = utf8;
  92. INSERT INTO ai_oqas.config (id, name, value, remark, deleted, create_time)
  93. VALUES ('1190184043818426369', 'DEFAULT_CONFIG', '{"threshold":"0.5"}', null, 0, '2019-11-01 16:29:22');
  94. drop table if exists config_user;
  95. create table config_user
  96. (
  97. id varchar(32) not null comment '主键',
  98. config_id varchar(32) not null comment '配置id',
  99. user_id varchar(32) not null comment '用户id',
  100. primary key (id)
  101. )
  102. engine = InnoDB
  103. default charset = utf8;
  104. drop table if exists robot_operate;
  105. create table robot_operate
  106. (
  107. id varchar(32) not null comment '主键',
  108. robot_id varchar(32) not null comment '机器人id',
  109. op_type varchar(32) comment '操作类型',
  110. op_code varchar(32) comment '操作结果码',
  111. op_result varchar(128) comment '操作结果',
  112. robot_status varchar(32) comment '机器人状态',
  113. create_time varchar(32) comment '创建时间',
  114. update_time varchar(32) comment '更新时间',
  115. primary key (id)
  116. )
  117. engine = InnoDB
  118. default charset = utf8;
  119. drop table if exists robot_file;
  120. create table robot_file
  121. (
  122. id varchar(32) not null comment '主键',
  123. robot_id varchar(32) not null comment '机器人id',
  124. faq_file varchar(128) comment 'faq文件',
  125. tree_file varchar(128) comment 'tree文件',
  126. graph_file varchar(128) comment 'graph文件',
  127. remark varchar(256) comment '备注',
  128. create_time varchar(32) comment '创建日期',
  129. operator varchar(32) DEFAULT NULL COMMENT '操作人',
  130. operator_id varchar(256) DEFAULT NULL COMMENT '操作人id',
  131. operate_ip varchar(256) DEFAULT NULL COMMENT '操作人ip',
  132. operate_time varchar(32) DEFAULT NULL COMMENT '操作时间',
  133. primary key (id)
  134. )
  135. engine = InnoDB
  136. default charset = utf8;
  137. drop table if exists robot_release;
  138. create table robot_release
  139. (
  140. robot_id varchar(32) not null comment '主键',
  141. access_type varchar(32) comment '接入类型',
  142. platform varchar(32) comment '平台名称',
  143. entry varchar(128) comment '平台入口',
  144. url varchar(128) comment '接口地址',
  145. wx_token varchar(128) comment '微信公众号令牌',
  146. remark varchar(256) comment '备注',
  147. create_time varchar(32) comment '创建日期',
  148. primary key (robot_id)
  149. )
  150. engine = InnoDB
  151. default charset = utf8;
  152. drop table if exists base_robot;
  153. create table base_robot
  154. (
  155. id varchar(32) not null comment '主键',
  156. field_id varchar(32) comment '领域id',
  157. field_name varchar(32) comment '领域名称',
  158. amount bigint comment '数据集数量',
  159. purchase_price varchar(32) comment '价格',
  160. name varchar(32) not null comment '名称',
  161. exchange varchar(128) not null comment '交换机',
  162. routing_key varchar(128) not null comment '路由键',
  163. description varchar(256) comment '描述',
  164. host varchar(32) comment '主机',
  165. port varchar(32) comment '端口号',
  166. username varchar(32) comment '用户名',
  167. password varchar(32) comment '密码',
  168. remark varchar(256) comment '备注',
  169. create_time varchar(32) comment '创建日期',
  170. update_time varchar(32) comment '更新日期',
  171. primary key (id)
  172. )
  173. engine = InnoDB
  174. default charset = utf8;
  175. drop table if exists robot_dataset;
  176. create table robot_dataset
  177. (
  178. id varchar(32) not null comment '主键',
  179. robot_id varchar(32) not null comment '机器人id',
  180. base_robot_id varchar(32) not null comment '数据集id',
  181. primary key (id)
  182. )
  183. engine = InnoDB
  184. default charset = utf8;