-- ----------------------------
-- Table structure for ms_report
-- ----------------------------
DROP TABLE IF EXISTS ms_report;
CREATE TABLE ms_report  (
  report_id         bigint(20) NOT NULL DEFAULT 0                           COMMENT '上报ID',
  house_id          bigint(20) NOT NULL DEFAULT 0                           COMMENT '门牌ID',
  safety_num        int(11) NOT NULL DEFAULT 0                              COMMENT '平安人数',
  suspected_num     int(11) NOT NULL DEFAULT 0                              COMMENT '疑似人数',
  remarks           varchar(100)  NOT NULL DEFAULT ''                       COMMENT '异常备注',
  ms_status         int(11) NOT NULL DEFAULT 1                              COMMENT '健康状态:1正常,2异常',
  user_create       bigint(20) NOT NULL DEFAULT 0                           COMMENT '新增人',
  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)       COMMENT '新增时间',
  user_update       bigint(20) NOT NULL DEFAULT 0                           COMMENT '修改人',
  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  PRIMARY KEY (report_id) USING BTREE
) ENGINE = InnoDB default charset=utf8 comment = '每日上报表'


-- ----------------------------
-- Table structure for ms_suspected
-- ----------------------------
DROP TABLE IF EXISTS ms_suspected;
CREATE TABLE ms_suspected  (
  suspected_id      bigint(20) NOT NULL DEFAULT 0                           COMMENT '疑似ID',
  report_id         bigint(20) NOT NULL DEFAULT 0                           COMMENT '上报ID',
  family_relative   int(11)    NOT NULL DEFAULT 1                           COMMENT '是否家庭成员:1是,2暂住亲友',
  medical           int(11)    NOT NULL DEFAULT 1                           COMMENT '是否就医:1否,1是',
  condition_status  int(11)    NOT NULL DEFAULT 0                           COMMENT '疑似情况:1咳嗽,2发烧,3腹泻,4胸痛,5咽痛,6其他 ',
  remarks           varchar(100)  NOT NULL DEFAULT ''                       COMMENT '异常备注',

  user_create       bigint(20) NOT NULL DEFAULT 0                           COMMENT '新增人',
  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)       COMMENT '新增时间',
  user_update       bigint(20) NOT NULL DEFAULT 0                           COMMENT '修改人',
  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  PRIMARY KEY (suspected_id) USING BTREE
) ENGINE = InnoDB default charset=utf8 comment = '家庭疑似表';