mrsb.sql 8.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. -- ----------------------------
  2. -- Table structure for ms_report
  3. -- ----------------------------
  4. DROP TABLE IF EXISTS ms_report;
  5. CREATE TABLE ms_report (
  6. report_id bigint(20) NOT NULL DEFAULT 0 COMMENT '上报ID',
  7. house_id bigint(20) NOT NULL DEFAULT 0 COMMENT '门牌ID',
  8. safety_num int(11) NOT NULL DEFAULT 0 COMMENT '今日居家人数',
  9. sure_num int(11) NOT NULL DEFAULT 0 COMMENT '确诊人数',
  10. suspected_num int(11) NOT NULL DEFAULT 0 COMMENT '异常疑似人数',
  11. normal_num int(11) NOT NULL DEFAULT 0 COMMENT '正常人数',
  12. single_num int(11) NOT NULL DEFAULT 0 COMMENT '隔离人数',
  13. remarks varchar(200) NOT NULL DEFAULT '' COMMENT '异常备注',
  14. report_date date COMMENT '上报日期',
  15. report_status int(11) NOT NULL DEFAULT 0 COMMENT '上报状态:0草稿,1正常',
  16. ms_status int(11) NOT NULL DEFAULT 1 COMMENT '健康状态:1正常,2异常',
  17. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  18. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  19. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  20. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  21. PRIMARY KEY (report_id) USING BTREE
  22. ) ENGINE = InnoDB default charset=utf8mb4 comment = '每日上报表'
  23. -- ----------------------------
  24. -- Table structure for ms_suspected
  25. -- ----------------------------
  26. DROP TABLE IF EXISTS ms_suspected;
  27. CREATE TABLE ms_suspected (
  28. suspected_id bigint(20) NOT NULL DEFAULT 0 COMMENT '疑似ID',
  29. report_id bigint(20) NOT NULL DEFAULT 0 COMMENT '上报ID',
  30. user_name varchar(50) NOT NULL DEFAULT '' COMMENT '家人姓名',
  31. grender int(11) NOT NULL DEFAULT 0 COMMENT '性别:0未设置,1男,2女',
  32. age int(11) NOT NULL DEFAULT 0 COMMENT '年龄',
  33. family_status varchar(50) NOT NULL DEFAULT 0 COMMENT '基本状态:1,0,1,0,0,0,1 (0表示未选中,1表示选中)',
  34. status_desp varchar(100) NOT NULL DEFAULT '' COMMENT '状态描述',
  35. medical int(11) NOT NULL DEFAULT 0 COMMENT '是否确诊:0否,1是',
  36. temperature decimal(14,2) NOT NULL DEFAULT 0 COMMENT '体温',
  37. temperature_score int(11) NOT NULL DEFAULT 0 COMMENT '体温评分结果:37.3以下0分, 37.3~38℃为 1分,38.1~39℃为中度发热 2分,39.1~40℃为高热 3分。40℃以上为超高热 4分',
  38. cough int(11) NOT NULL DEFAULT 0 COMMENT '咳嗽:0无咳嗽,1偶有短暂咳嗽,2咳嗽轻度影响生活,3咳嗽严重影响生活',
  39. muscle int(11) NOT NULL DEFAULT 0 COMMENT '肌肉酸痛:0无,1按压有,2偶尔,3持续有',
  40. dyspnea int(11) NOT NULL DEFAULT 0 COMMENT '呼吸困难:0无,1急走或上坡气短,2气短而走路变慢,3走路数分钟后气短,4气短无法离开房间',
  41. fatigue int(11) NOT NULL DEFAULT 0 COMMENT '乏力:0无,1体力劳动后不能恢复,2轻体力活非常累,3不能正常生活',
  42. diarrhea int(11) NOT NULL DEFAULT 0 COMMENT '腹泻:0无,1轻度腹泻少于于3次,2中度腹泻4-6次,3重度腹泻超过6次',
  43. score_histroy int(11) NOT NULL DEFAULT 0 COMMENT '历史数据,没有历史数据,就是1分以下为安全,2分到3分为注意观察,3分以上联系医生,5分尽快就诊。有历史数据,一天增加三分及以上就是建议马上就医',
  44. score int(11) NOT NULL DEFAULT 0 COMMENT '今日数据',
  45. score_rezult int(11) NOT NULL DEFAULT 0 COMMENT '评分结果,未评分(0),正常(1),注意观察(2),联系医生(3),尽快就诊(4)',
  46. single_room int(11) NOT NULL DEFAULT 0 COMMENT '单间隔离:0否,1是',
  47. suspected_status int(11) NOT NULL DEFAULT 0 COMMENT '是否疑似:0否,1是',
  48. others varchar(600) NOT NULL DEFAULT '' COMMENT '其他',
  49. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  50. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  51. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  52. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  53. PRIMARY KEY (suspected_id) USING BTREE
  54. ) ENGINE = InnoDB default charset=utf8mb4 comment = '家庭疑似表';
  55. -- ----------------------------
  56. -- Table structure for ms_trip
  57. -- ----------------------------
  58. DROP TABLE IF EXISTS ms_trip;
  59. CREATE TABLE ms_trip (
  60. trip_id bigint(20) NOT NULL DEFAULT 0 COMMENT '出行ID:和疑似ID一对一关系',
  61. work_local bigint(20) NOT NULL DEFAULT 0 COMMENT '工作驻地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
  62. work_local_other varchar(50) NOT NULL DEFAULT '' COMMENT '工作驻地其他地点',
  63. today_local bigint(20) NOT NULL DEFAULT 0 COMMENT '今日驻地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
  64. today_local_other varchar(50) NOT NULL DEFAULT '' COMMENT '今日驻地其他地点',
  65. is_trip int(11) NOT NULL DEFAULT 0 COMMENT '是否出行:0否,1是',
  66. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  67. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  68. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  69. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  70. PRIMARY KEY (trip_id) USING BTREE
  71. ) ENGINE = InnoDB default charset=utf8mb4 comment = '家庭出行表';
  72. -- ----------------------------
  73. -- Table structure for ms_trip_det
  74. -- ----------------------------
  75. DROP TABLE IF EXISTS ms_trip_det;
  76. CREATE TABLE ms_trip_det (
  77. trip_det_id bigint(20) NOT NULL DEFAULT 0 COMMENT '出行详细ID',
  78. trip_id bigint(20) NOT NULL DEFAULT 0 COMMENT '出行ID:和疑似ID一对一关系',
  79. sort int(11) NOT NULL DEFAULT 0 COMMENT '序号',
  80. start_local bigint(20) NOT NULL DEFAULT 0 COMMENT '出发地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
  81. start_local_other varchar(50) NOT NULL DEFAULT '' COMMENT '出发地其他地点',
  82. end_local bigint(20) NOT NULL DEFAULT 0 COMMENT '目的地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
  83. end_local_other varchar(50) NOT NULL DEFAULT '' COMMENT '目的地其他地点',
  84. trip_type int(11) NOT NULL DEFAULT 0 COMMENT '出行方式:0未填写,1长途汽车,2火车,3飞机',
  85. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  86. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  87. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  88. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  89. PRIMARY KEY (trip_det_id) USING BTREE
  90. ) ENGINE = InnoDB default charset=utf8mb4 comment = '家庭出行详细表';