소스 검색

更改sql

peiguo 5 년 전
부모
커밋
2afd923ae7
1개의 변경된 파일14개의 추가작업 그리고 4개의 파일을 삭제
  1. 14 4
      whepi-doc/login.sql

+ 14 - 4
whepi-doc/login.sql

@@ -129,15 +129,25 @@ CREATE TABLE sys_uptown  (
   PRIMARY KEY (uptown_id) USING BTREE
   PRIMARY KEY (uptown_id) USING BTREE
 ) ENGINE = InnoDB default charset=utf8 comment = '小区表';
 ) ENGINE = InnoDB default charset=utf8 comment = '小区表';
 
 
-DROP TABLE IF EXISTS sys_uptown_house;
-CREATE TABLE sys_uptown_house  (
-  house_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '门牌ID',
+DROP TABLE IF EXISTS sys_uptown_unit;
+CREATE TABLE sys_uptown_unit  (
+  unit_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '单元ID',
   uptown_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '小区ID',
   uptown_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '小区ID',
   ridgepole         varchar(20) NOT NULL DEFAULT '' COMMENT '栋',
   ridgepole         varchar(20) NOT NULL DEFAULT '' COMMENT '栋',
   unit              varchar(20) NOT NULL DEFAULT '' COMMENT '单元',
   unit              varchar(20) NOT NULL DEFAULT '' COMMENT '单元',
+  status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
+  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
+  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  PRIMARY KEY (unit_id) USING BTREE
+) ENGINE = InnoDB default charset=utf8 comment = '栋,单元信息表';
+
+DROP TABLE IF EXISTS sys_uptown_house;
+CREATE TABLE sys_uptown_house  (
+  house_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '门牌ID',
+  unit_id          bigint(20) NOT NULL DEFAULT 0 COMMENT '单元ID',
   doorplate         varchar(20)  NOT NULL DEFAULT '' COMMENT '门牌',
   doorplate         varchar(20)  NOT NULL DEFAULT '' COMMENT '门牌',
   status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
   status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
   time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
   time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
   PRIMARY KEY (house_id) USING BTREE
   PRIMARY KEY (house_id) USING BTREE
-) ENGINE = InnoDB default charset=utf8 comment = '门牌信息表';
+) ENGINE = InnoDB default charset=utf8 comment = '门牌信息表';