mrsb.sql 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. resident_id bigint(20) NOT NULL DEFAULT 0 COMMENT '居民ID',
  8. safety_num int(11) NOT NULL DEFAULT 0 COMMENT '平安人数',
  9. suspected_num int(11) NOT NULL DEFAULT 0 COMMENT '疑似人数',
  10. remarks varchar(100) NOT NULL DEFAULT '' COMMENT '异常备注',
  11. ms_status int(11) NOT NULL DEFAULT 1 COMMENT '健康状态:1正常,2异常',
  12. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  13. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  14. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  15. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  16. PRIMARY KEY (report_id) USING BTREE
  17. ) ENGINE = InnoDB default charset=utf8 comment = '每日上报表'
  18. -- ----------------------------
  19. -- Table structure for ms_suspected
  20. -- ----------------------------
  21. DROP TABLE IF EXISTS ms_suspected;
  22. CREATE TABLE ms_suspected (
  23. suspected_id bigint(20) NOT NULL DEFAULT 0 COMMENT '疑似ID',
  24. resident_id bigint(20) NOT NULL DEFAULT 0 COMMENT '居民ID',
  25. family_relative int(11) NOT NULL DEFAULT 1 COMMENT '是否家庭成员:1是,2暂住亲友',
  26. medical int(11) NOT NULL DEFAULT 1 COMMENT '是否就医:1否,1是',
  27. condition_status int(11) NOT NULL DEFAULT 0 COMMENT '疑似情况:1咳嗽,2发烧,3腹泻,4胸痛,5咽痛,6其他 ',
  28. remarks varchar(100) NOT NULL DEFAULT '' COMMENT '异常备注',
  29. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  30. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  31. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  32. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  33. PRIMARY KEY (suspected_id) USING BTREE
  34. ) ENGINE = InnoDB default charset=utf8 comment = '家庭疑似表';