CREATE TABLE `bpip_att` (
  `ID` varchar(20) NOT NULL,
  `FLOWID` varchar(50) default NULL,
  `FORMID` varchar(50) default NULL,
  `FILEID` varchar(20) default NULL,
  `FILENAME` varchar(200) default NULL,
  `FILESIZE` bigint(20) default NULL,
  `FILEPATH` varchar(200) default NULL,
  `FILEUSERNO` varchar(16) default NULL,
  `ENTERDATE` datetime default NULL,
  `AID` varchar(50) default NULL,
  `YNAME` varchar(200) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `bpip_field` (
  `FIELDID` varchar(8) NOT NULL,
  `TABLEID` varchar(4) default NULL,
  `FIELDNAME` varchar(30) default NULL,
  `FIELDTAG` varchar(2) default NULL,
  `CHINESENAME` varchar(60) default NULL,
  `FIELDTYPE` varchar(1) default NULL,
  `FIELDLENGTH` smallint(6) default NULL,
  `ISNULL` varchar(1) default NULL,
  `DICTTABLE` varchar(30) default NULL,
  `DESCRIPTION` varchar(255) default NULL,
  `TAGEXT` tinyint(4) default NULL,
  `AUTO1` varchar(8) default NULL,
  `AUTO2` varchar(8) default NULL,
  `AUTO3` varchar(8) default NULL,
  `BLOBSIZE` int(11) default NULL,
  `QFIELD` varchar(200) default NULL,
  `ISKEY` varchar(1) default NULL,
  PRIMARY KEY  (`FIELDID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `bpip_handset` (
  `ID` varchar(20) NOT NULL,
  `USERNO` varchar(16) default NULL,
  `MOBILE` varchar(20) default NULL,
  `CONTENT` varchar(500) default NULL,
  `SENDDATE` datetime default NULL,
  `FINISHDATE` datetime default NULL,
  `TYPEBOX` tinyint(4) default NULL,
  `SENDTYPE` varchar(2) default NULL,
  `MONTH` smallint(6) default NULL,
  `WEEK` smallint(6) default NULL,
  `DAY` smallint(6) default NULL,
  `HOUR` smallint(6) default NULL,
  `MINUTE` smallint(6) default NULL,
  `ISSEND` varchar(1) default NULL,
  `TTABLEID` varchar(50) default NULL,
  `SUSERNO` varchar(16) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `bpip_menu` (
  `MENUNO` varchar(9) NOT NULL,
  `MENUNAME` varchar(50) default NULL,
  `ISPOWER` varchar(1) default NULL,
  `URL` varchar(300) default NULL,
  `ISOPEN` varchar(1) default NULL,
  `FLAG` varchar(1) default NULL,
  `MNCODE` varchar(9) default NULL,
  PRIMARY KEY  (`MENUNO`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `bpip_msgcontent` (
  `CUSERNO` varchar(16) default NULL,
  `CONTENT` varchar(500) default NULL,
  `SENDDATE` datetime default NULL,
  `ISCK` varchar(1) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `bpip_role` (
  `ROLEID` decimal(10,0) NOT NULL,
  `ROLENAME` varchar(30) NOT NULL,
  `DESCRIPTION` varchar(100) default NULL,
  PRIMARY KEY  (`ROLEID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



CREATE TABLE `bpip_role_rermississon` (
  `ROLEID` decimal(10,0) default NULL,
  `MENUNO` varchar(9) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_table` (
  `TABLEID` varchar(4) NOT NULL,
  `TABLENAME` varchar(30) default NULL,
  `CHINESENAME` varchar(60) default NULL,
  `TABLESPACE` varchar(30) default NULL,
  `DESCRIPTION` varchar(255) default NULL,
  `TABLETYPE` varchar(1) default NULL,
  `PRIMARYKEY` varchar(30) default NULL,
  `TITLE` varchar(30) default NULL,
  PRIMARY KEY  (`TABLEID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_tablespace` (
  `ID` varchar(2) NOT NULL,
  `CHINESENAME` varchar(60) default NULL,
  `DESCRIPTION` varchar(255) default NULL,
  `DTABLE` varchar(200) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_unit` (
  `UNITID` varchar(12) NOT NULL,
  `UNITNAME` varchar(100) default NULL,
  `STATE` varchar(1) default NULL,
  `ORDERCODE` varchar(4) default NULL,
  PRIMARY KEY  (`UNITID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_user` (
  `USERID` varchar(16) NOT NULL,
  `LOGINID` varchar(20) default NULL,
  `LOGINPW` varchar(32) default NULL,
  `USERSTATE` varchar(1) default NULL,
  `NAME` varchar(30) default NULL,
  `LCODE` varchar(6) default NULL,
  `UNITID` varchar(12) default NULL,
  `SEX` varchar(1) default NULL,
  `BIRTHDAY` date default NULL,
  `PHONE` varchar(30) default NULL,
  `MOBILE` varchar(100) default NULL,
  `EMAIL` varchar(50) default NULL,
  `USERIMAGE` varchar(3) default NULL,
  `LOGINTIME` bigint(20) default NULL,
  `PAGESIZE` smallint(6) default NULL,
  `WINDOWTYPE` varchar(1) default NULL,
  `DEPTINSIDE` varchar(1) default NULL,
  `ORBERCODE` varchar(6) default NULL,
  `ONLINEDATE` datetime default NULL,
  PRIMARY KEY  (`USERID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_user_idea` (
  `ID` varchar(8) NOT NULL,
  `USER_NO` varchar(16) default NULL,
  `CONTENT` varchar(200) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_user_photo` (
  `USERID` varchar(16) NOT NULL,
  `USERPHOTO` longblob,
  `USERIMAGE` varchar(3) default NULL,
  `IDIOGRAPH` longblob,
  PRIMARY KEY  (`USERID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_user_remove` (
  `ID` decimal(10,0) NOT NULL,
  `MOVETIME` datetime default NULL,
  `USERID` varchar(16) default NULL,
  `BEFOREUNIT` varchar(100) default NULL,
  `AFTERUNIT` varchar(100) default NULL,
  `MOVEREASON` varchar(255) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;


CREATE TABLE `bpip_user_role` (
  `USERID` varchar(16) default NULL,
  `ROLEID` decimal(10,0) default NULL,
  `UNITID` varchar(12) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=gbk;





