task.sql 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. -- ----------------------------
  2. -- Table structure for qz_task
  3. -- ----------------------------
  4. drop table if exists qz_task;
  5. create table qz_task (
  6. task_id bigint(20) NOT NULL DEFAULT 0 COMMENT '求助任务ID',
  7. task_target varchar(20) NOT NULL DEFAULT '' COMMENT '求助对象:A业委会,B居委会,C物业,D志愿者',
  8. task_type int(11) NOT NULL DEFAULT 0 COMMENT '求助类型:1生活必需品,2医药求助,3其他求助',
  9. task_status int(11) NOT NULL DEFAULT 0 COMMENT '求助状态:1未解决,2处理中,3已处理',
  10. remark varchar(100) NOT NULL DEFAULT '' COMMENT '备注',
  11. user_id bigint(20) NOT NULL DEFAULT 0 COMMENT '用户ID',
  12. user_name varchar(20) NOT NULL DEFAULT '' COMMENT '用户名称',
  13. house_number varchar(20) NOT NULL DEFAULT '' COMMENT '门牌号',
  14. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  15. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  16. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  17. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  18. PRIMARY KEY (task_id) USING BTREE,
  19. INDEX user_id(user_id) USING BTREE
  20. )
  21. ENGINE = InnoDB
  22. DEFAULT CHARSET = utf8
  23. COMMENT = '家庭求助表'
  24. ;
  25. -- ----------------------------
  26. -- Table structure for qz_task_reply
  27. -- ----------------------------
  28. DROP TABLE IF EXISTS qz_task_reply;
  29. CREATE TABLE qz_task_reply (
  30. reply_id bigint(20) NOT NULL DEFAULT 0 COMMENT '回复ID',
  31. task_id bigint(20) NOT NULL DEFAULT 0 COMMENT '求助ID',
  32. user_id bigint(20) NOT NULL DEFAULT 0 COMMENT '回复用户ID',
  33. reply_content varchar(100) NOT NULL DEFAULT '' COMMENT '回复内容',
  34. user_create bigint(20) NOT NULL DEFAULT 0 COMMENT '新增人',
  35. time_create datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
  36. user_update bigint(20) NOT NULL DEFAULT 0 COMMENT '修改人',
  37. time_update datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  38. PRIMARY KEY (reply_id) USING BTREE
  39. ) ENGINE = InnoDB default charset=utf8 comment = '家庭求助回复表';