CREATE TABLE `AREA` (
	`SERIALNO` AUTOINCREMENT (1,   1) NOT NULL, 
	`SNAME` varchar (50)  NULL ,
	`FSERIALNO` Double NULL ,
	`LEVELTYPE` Double NULL ,
	`POSTCODE` varchar (50)  NULL ,
	`AREANUM` varchar (50)  NULL ,
	`TMPPOSTCODE` varchar (50)  NULL ,
	`TMPAREANUM` varchar (50)  NULL ,
	`PINYIN` varchar (50)  NULL 
) 
GO

CREATE TABLE `MessageMirror` (
	`MessageID` AUTOINCREMENT (1,   1) NOT NULL ,
	`SendUserNo` Double NULL ,
	`RecieveUserNo` Double NULL ,
	`SendUserID` varchar (100)  NULL ,
	`RecieveUserID` varchar (100)  NULL ,
	`Message` LongText  NOT NULL ,
	`UmFlag` Double NOT NULL ,
	`NoteFlag` Double NULL ,
	`SubmitTime` datetime NULL ,
	`UmSendTime` datetime NULL ,
	`NoteSendTime` datetime NULL 
) 
GO

CREATE TABLE `OfflineFiles` (
	`sFromID` varchar (200)  NULL ,
	`sToID` varchar (200)  NULL ,
	`sFileName` varchar (200)  NULL ,
	`sPath` varchar (200)  NULL ,
	`srealfilename` varchar (150)  NULL ,
	`sSize` varchar (10)  NULL ,
	`sType` varchar (10)  NULL ,
	`sTime` varchar (40)  NULL ,
	`sSendOk` Double NULL 
) 
GO

CREATE TABLE `OfflineInfo` (
	`FromUser` varchar (200)  NULL ,
	`ToUser` varchar (200)  NULL ,
	`SendTime` datetime NULL ,
	`SendContent` LongText  NULL ,
	`FromRealm` varchar (100)  NULL ,
	`ToRealm` varchar (100)  NULL 
) 
GO

CREATE TABLE `OrgReg` (
	`orgid` AUTOINCREMENT (1,   1) NOT NULL ,
	`orgname` varchar (200)  NULL ,
	`orghdid` varchar (20)  NULL ,
	`orgkey` varchar (20)  NULL ,
	`orggmdate` datetime NULL ,
	`lastdate` datetime NULL ,
	`yxdate` datetime NULL ,
	`regtype` Double NULL ,
	`orgurl` varchar (100)  NULL ,
	`orgnum` Double NULL ,
	`serviceId` varchar (10)  NULL ,
	`orgaddr` varchar (200)  NULL ,
	`orgpost` varchar (10)  NULL ,
	`orgtel` varchar (20)  NULL ,
	`linkman` varchar (20)  NULL ,
	`mobile` varchar (20)  NULL ,
	`email` varchar (200)  NULL ,
	`fax` varchar (20)  NULL ,
	`regstatus` Double NULL ,
	`active` Double NULL 
) 
GO

CREATE TABLE `OrgRegLogIn` (
	`orgid` varchar (50)  NULL ,
	`orghdid` varchar (20)  NULL ,
	`orgkey` varchar (20)  NULL ,
	`lastdate` datetime NULL ,
	`orgnum` varchar (50)  NULL ,
	`onlinenum` varchar (50)  NULL ,
	`dayusernum` varchar (50)  NULL 
) 
GO

CREATE TABLE `RoomMember` (
	`MemberId` AUTOINCREMENT (1,   1) NOT NULL ,
	`RoomName` varchar (100)  NOT NULL ,
	`Nick` varchar (20)  NULL ,
	`jid` varchar (100)  NOT NULL ,
	`status` varchar (10)  NULL ,
	`show` varchar (30)  NULL ,
	`blockShow` varchar (20)  NULL ,
	`role` varchar (20)  NULL ,
	`affiliation` varchar (20)  NULL ,
	`adddatetime` datetime NULL ,
	`lastdatetime` datetime NULL ,
	`membertype` Double NULL ,
	`RoomClass` varchar (200)  NULL 
) 
GO

CREATE TABLE `RoomOutcast` (
	`OutcastId` AUTOINCREMENT (1,   1) NOT NULL ,
	`RoomName` varchar (100)  NOT NULL ,
	`jid` varchar (200)  NOT NULL ,
	`reason` varchar (200)  NULL 
) 
GO

CREATE TABLE `RoomRequest` (
	`RequestId` AUTOINCREMENT (1,   1) NOT NULL ,
	`RoomName` varchar (200)  NULL ,
	`itype` Double NULL ,
	`Tojid` varchar (200)  NULL ,
	`fromjid` varchar (200)  NULL ,
	`sxml` LongText  NULL ,
	`bz` varchar (100)  NULL 
) 
GO

CREATE TABLE `authreg` (
	`username` varchar (100)  NOT NULL ,
	`realm` varchar (100)  NOT NULL ,
	`password` varchar (80)  NULL ,
	`USERID` Double NULL ,
	`serialNo` Double NULL ,
	`companyID` Double NULL ,
	`token` varchar (50)  NULL ,
	`sequence` Double NULL ,
	`hash` varchar (50)  NULL ,
	`nickname` varchar (100)  NULL ,
	`organizeNo` varchar (100)  NULL ,
	`usertype` Double NOT NULL ,
	`userrole` varchar (10)  NULL ,
	`regDate` datetime NULL ,
	`lastdate` datetime NULL ,
	`loginnum` Double NULL ,
	`mind` varchar (50)  NULL ,
	`sstatus` varchar (100)  NULL ,
	`sshow` varchar (50)  NULL ,
	`spriority` varchar (50)  NULL ,
	`istatus` Double NULL  Default 0,
	`isdemo`  Short  Default 0
) 
GO

CREATE TABLE `motd-message` (
	`object-sequence` AUTOINCREMENT (1,   1) NOT NULL ,
	`collection-owner` varchar (200)  NULL ,
	`xml` LongText  NULL 
) 
GO

CREATE TABLE `occupationtype` (
	`clsname` varchar (50)  NOT NULL ,
	`tag` Double NULL 
) 
GO

CREATE TABLE `organize` (
	`organizeNo` varchar (50)  NOT NULL ,
	`organizename` varchar (100)  NULL ,
	`parNo` varchar (50)  NULL ,
	`orgorder` varchar (50)  NULL ,
	`isdemo`  Short  Default 0
) 
GO

CREATE TABLE `orguser` (
	`userid` varchar (100)  NOT NULL ,
	`orgid` varchar (50)  NOT NULL ,
	`isdemo`  Short  Default 0
) 
GO

CREATE TABLE `producttype` (
	`clsname` varchar (50)  NOT NULL ,
	`tag` Double NULL 
) 
GO

CREATE TABLE `queue` (
	`object-sequence` AUTOINCREMENT (1,   1) NOT NULL ,
	`collection-owner` varchar (200)  NULL ,
	`xml` LongText  NULL ,
	`Message` LongText  NULL ,
	`sid` varchar (20)  NULL ,
	`sfrom` varchar (120)  NULL ,
	`sto` varchar (120)  NULL ,
	`senddatetime` datetime NULL 
)  
GO

CREATE TABLE `right` (
	`rightno` Double NOT NULL ,
	`rightName` varchar (50)  NULL 
) 
GO

CREATE TABLE `roleright` (
	`orgno` varchar (20)  NULL ,
	`roleno` varchar (10)  NULL ,
	`userrole` varchar (50)  NULL ,
	`rightName` varchar (50)  NULL ,
	`datatype` Double NULL 
) 
GO

CREATE TABLE `room` (
	`roomid` AUTOINCREMENT (1,   1) NOT NULL ,
	`roomname` varchar (100)  NOT NULL ,
	`ServerName` varchar (100)  NOT NULL ,
	`RealRoomName` varchar (200)  NULL ,
	`RoomCaption` varchar (100)  NULL ,
	`RoomSubject` varchar (100)  NULL ,
	`persistentroom` Bit NULL ,
	`publicroom` Bit NULL ,
	`publiclist` Bit NULL ,
	`passwordprotectedroom` Bit NULL ,
	`roomsecret` varchar (20)  NULL ,
	`maxusers` Double NULL ,
	`whois` varchar (10)  NULL ,
	`membersonly` Bit NULL ,
	`moderatedroom` Bit NULL ,
	`membersbydefault` Bit NULL ,
	`changesubject` Bit NULL ,
	`allowFprivatemessages` Bit NULL ,
	`allowqueryusers` Bit NULL ,
	`allowinvites` Bit NULL ,
	`RoomType` varchar (50)  NULL ,
	`CreateUser` varchar (50)  NULL ,
	`Status` Double NULL ,
	`Priority` Double NULL ,
	`RoomClass` varchar (200)  NULL 
) 
GO

CREATE TABLE `roommsg` (
	`MsgId` AUTOINCREMENT (1,   1) NOT NULL ,
	`RoomName` varchar (100)  NULL ,
	`sMsgXml` LongText  NULL ,
	`sSendMember` LongText  NULL ,
	`sFrom` varchar (200)  NULL ,
	`sMsg` LongText  NULL ,
	`dSendDate` datetime NULL ,
	`sId` varchar (20)  NULL 
) 
GO

CREATE TABLE `rostergroups` (
	`objectsequence` AUTOINCREMENT (1,   1) NOT NULL ,
	`collectionowner` varchar (200)  NULL ,
	`jid` varchar (200)  NULL ,
	`group` varchar (200)  NULL 
) 
GO

CREATE TABLE `rosteritems` (
	`objectsequence` AUTOINCREMENT (1,   1) NOT NULL ,
	`collectionowner` varchar (100)  NULL ,
	`jid` varchar (100)  NULL ,
	`name` varchar (50)  NULL ,
	`to` Double NULL ,
	`from` Short NULL ,
	`ask` Short NULL 
) 
GO

CREATE TABLE `service` (
	`serviceid` varchar (50)  NULL ,
	`servicename` varchar (200)  NULL ,
	`servicegmdate` datetime NULL ,
	`servicetype` Double NULL ,
	`serviceurl` varchar (100)  NULL ,
	`serviceaddr` varchar (200)  NULL ,
	`servicepost` varchar (10)  NULL ,
	`servicetel` varchar (20)  NULL ,
	`linkman` varchar (20)  NULL ,
	`mobile` varchar (20)  NULL ,
	`email` varchar (200)  NULL ,
	`regstatus` Double NULL ,
	`active` Double NULL 
) 
GO

CREATE TABLE `usertype` (
	`orgno` varchar (20)  NULL ,
	`usertypeno` Double NULL ,
	`usertypename` varchar (50)  NULL ,
	`datatype` Double NULL 
) 
GO

CREATE TABLE `usertyperight` (
	`usertypeno` Double NULL ,
	`righttypeno` Double NULL 
) 
GO

CREATE TABLE `vcard` (
	`object_sequence` AUTOINCREMENT (1,   1) NOT NULL ,
	`collection_owner` varchar (200)  NULL ,
	`username` varchar (100)  NULL ,
	`nickname` varchar (100)  NULL ,
	`fn` varchar (200)  NULL ,
	`url` varchar (200)  NULL ,
	`tel` varchar (20)  NULL ,
	`email` varchar (200)  NULL ,
	`title` varchar (200)  NULL ,
	`role` varchar (200)  NULL ,
	`bday` varchar (200)  NULL ,
	`self_desc` varchar (200)  NULL ,
	`n_given` varchar (200)  NULL ,
	`n_family` varchar (200)  NULL ,
	`adr_street` varchar (200)  NULL ,
	`adr_extadd` varchar (200)  NULL ,
	`adr_locality` varchar (200)  NULL ,
	`adr_region` varchar (200)  NULL ,
	`adr_pcode` varchar (20)  NULL ,
	`adr_country` varchar (200)  NULL ,
	`org_orgname` varchar (200)  NULL ,
	`org_orgunit` varchar (200)  NULL ,
	`organizeNo` varchar (200)  NULL ,
	`work_tel` varchar (50)  NULL ,
	`mobilephone` varchar (50)  NULL ,
	`work_adr` varchar (50)  NULL ,
	`sex` varchar (10)  NULL ,
	`work_fax` varchar (50)  NULL ,
	`Business` varchar (50)  NULL ,
	`sXml` LongText  NULL ,
	`industry` varchar (60)  NULL ,
	`area_1` varchar (40)  NULL ,
	`area_2` varchar (40)  NULL ,
	`area_3` varchar (40)  NULL ,
	`isdemo`  Short  Default 0
)  
GO
CREATE TABLE `umsysinfo` (
	`id` AUTOINCREMENT (1,   1) NOT NULL,
	`itype` Double  NULL ,
	`sname` varchar (50) NULL ,
	`slable` varchar (50) NULL ,
	`sbz` varchar (50) NULL 
) 
GO
CREATE TABLE `ftpfile` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`filepath` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`itype` Double NULL ,
	`irighttype` Double NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifilevalue` Double NULL ,
	`itotalfilevalue` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfileall` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifilevalue` Double NULL ,
	`itotalfilevalue` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfilegroup` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`sgroupid` varchar (200)  NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfileorg` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`sorgid` varchar (200)  NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfileorglist` (
	`sfilename` varchar (200)  NULL ,
	`ssendid` varchar (200)  NULL ,
	`sorgid` varchar (200)  NULL ,
	`itype` Double NULL 
) 
GO

CREATE TABLE `ftpfileuser` (
	`sfilename` varchar (200)  NULL ,
	`ssendid` varchar (200)  NULL ,
	`suserid` varchar (200)  NULL ,
	`itype` Double NULL 
) 
GO

CREATE TABLE `ftpfileversion` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`ssendid` varchar (200)  NULL ,
	`sfilename` varchar (200)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`sfileversion` varchar (4)  NULL ,
	`itype` Double NULL 
) 
GO
CREATE TABLE `IPTABLE` (
`ID` Long NOT NULL, 
`StartIPNum` Currency NOT NULL, 
`StartIPText` VarChar (15) NULL, 
`EndIPNum` Currency NOT NULL, 
`EndIPText` VarChar (15) NULL, 
`Country` VarChar (255) NULL, 
`Local` VarChar (255) NULL )
GO
CREATE TABLE `MessageLog` (
`COLLECTION-OWNER` VarChar (200) NULL, 
`xml` LongText NULL, 
`message` LongText NULL, 
`sid` VarChar (50) NULL, 
`sfrom` VarChar (200) NULL, 
`sto` VarChar (200) NULL, 
`senddate` DateTime NULL, 
`sendip` VarChar (20) NULL )
GO
CREATE TABLE `DnsServer` (
`username` VarChar (20) NULL, 
`psword` VarChar (20) NULL, 
`usertype` Long NULL, 
`dnsname` VarChar (20) NULL, 
`dnsip` VarChar (20) NULL, 
`regdate` DateTime NULL, 
`lastdate` DateTime NULL, 
`istatus` Long NULL )
GO
CREATE TABLE `statistic` (
`id` Long NOT NULL, 
`sresource` VarChar (10) NULL, 
`sreferrer` VarChar (200) NULL, 
`surl` VarChar (100) NULL, 
`skeyword` VarChar (100) NULL, 
`sappName` VarChar (100) NULL, 
`sappCodeName` VarChar (100) NULL, 
`sappVersion` VarChar (100) NULL, 
`splatform` VarChar (100) NULL, 
`slanguage` VarChar (100) NULL, 
`logindate` DateTime NULL, 
`sip` VarChar (100) NULL, 
`iip` Double NULL, 
`sOrgid` VarChar (20) NULL, 
`sCountry` VarChar (255) NULL, 
`sLocal` VarChar (255) NULL )
GO
CREATE TABLE `tSysClassDict` (
`ClassID` Decimal (5,0) NOT NULL, 
`ClassName` VarChar (40) NOT NULL, 
`DatasetName` VarChar (40) NULL, 
`JkClassType` VarChar (1) NULL, 
`JkDatasetName` VarChar (40) NULL, 
`JkMemo` VarChar (200) NULL )
GO
CREATE TABLE `tSysClassPropDict` (
`ClassID` Decimal (5,0) NOT NULL, 
`DatasetName` VarChar (40) NOT NULL, 
`PropID` Decimal (5,0) NOT NULL, 
`PropName` VarChar (40) NOT NULL, 
`FieldName` VarChar (40) NOT NULL, 
`JkDatasetName` VarChar (40) NULL, 
`JkFieldName` VarChar (40) NULL, 
`JkPropType` VarChar (10) NULL, 
`JkDataWidth` Decimal (5,0) NULL, 
`JkJoin` VarChar (200) NULL, 
`encrypt` Bit NOT NULL, 
`encryptType` VarChar (10) NULL, 
`encryptPass` VarChar (40) NULL, 
`encryptDll` VarChar (40) NULL, 
`encryptFunction` VarChar (40) NULL )
GO
CREATE TABLE `tSysEnumType` (
`LangID` Decimal (5,0) NOT NULL, 
`EnumTypeID` Decimal (5,0) NOT NULL, 
`EnumTypeName` VarChar (40) NOT NULL, 
`VerNo` VarChar (20) NULL )
GO
CREATE TABLE `tSysEnumValue` (
`LangID` Decimal (5,0) NOT NULL, 
`EnumTypeID` Decimal (5,0) NOT NULL, 
`EnumValueID` VarChar (4) NOT NULL, 
`EnumValueName` VarChar (40) NOT NULL, 
`IsDefault` VarChar (1) NOT NULL, 
`DispIndex` Decimal (5,0) NOT NULL, 
`VerNo` VarChar (20) NULL )
GO
alter table organize add `url` VarChar (200) NULL;
GO 
alter table organize add `email` VarChar (200) NULL; 
GO
alter table organize add `worktel` VarChar (50) NULL; 
GO
alter table organize add `workadr` VarChar (50) NULL; 
GO
alter table organize add `industry` VarChar (60) NULL; 
GO
alter table organize add `username` VarChar (100) NULL;
GO
alter table organize add `yxdate` DateTime NULL;
GO
alter table organize add `usernum` Long NULL;
GO
alter table organize add `stype` Long NULL;
GO
alter table organize add `righttype` Long NULL;
GO

CREATE TABLE `orgright` (
`rightno` Long NOT NULL, 
`rightName` VarChar (50) NULL )
GO

CREATE TABLE `Orgrightlist` (
`righttype` Long NOT NULL, 
`rightname` VarChar (50) NULL, 
`rightno` Long NOT NULL )
GO

CREATE TABLE `appraise` (
`sappraise` VarChar (100) NULL, 
`susername` VarChar (100) NULL, 
`slevel` Long NULL, 
`scontent` VarChar (250) NULL, 
`appraisedate` DateTime NULL, 
`orgid` VarChar (20) NULL )
GO
insert into umsysinfo (itype, sname, slable) values (0,'3.0.0.100902','数据库版本')
GO
insert into orgright (rightno,rightname) values (1,'基本客服')
GO
insert into orgright (rightno,rightname) values (2,'客服管理')
GO
insert into orgright (rightno,rightname) values (3,'统计分析')
GO
insert into orgright (rightno,rightname) values (4,'扩展功能')
GO
insert into orgright (rightno,rightname) values (5,'增值功能')
GO
insert into orgrightlist (righttype,rightname,rightno) values (1,'基本功能',1)
GO
insert into orgrightlist (righttype,rightname,rightno) values (1,'基本功能',2)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',1)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',2)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',3)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',4)
GO

insert into roleright (orgno, roleno, userrole, rightName, datatype) values ('001','1','部门经理','1101000000000000',1)
GO
insert into roleright (orgno, roleno, userrole, rightName, datatype) values ('001','2','服务员','1110100000000000',1)
GO
insert into roleright (orgno, roleno, userrole, rightName, datatype) values ('001','3','员工','1000000000000000',0)
GO
insert into roleright (orgno, roleno, userrole, rightName, datatype) values ('Root','6','经理','1100110000000100',0)
GO

insert into organize (organizeNo,organizename,orgOrder,isdemo) values ('001','联信UM虚拟有限公司','1',1)
GO

INSERT INTO producttype (clsname) VALUES ('电子')
GO	
INSERT INTO producttype (clsname) VALUES ('纺织')
GO
INSERT INTO producttype (clsname) VALUES ('服务')
GO
INSERT INTO producttype (clsname) VALUES ('化工')
GO
INSERT INTO producttype (clsname) VALUES ('机械')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('0','文件')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('1','文件夹')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('2','语音')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('3','视频')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('4','协助')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('5','控制')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('6','建群(会议室)')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('7','加入群(会议室)')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('8','群发消息')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('9','删除好友')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('10','添加联系人')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('11','个人信息修改')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('12','组织内通讯')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('13','组织外通讯')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('14','插件')
GO
INSERT INTO [RIGHT] (rightno,rightName) VALUES ('15','升级')
GO

INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','00','默认角色','1111111111111111',1)
GO
INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','01','员工','1111111111111111',0)
GO
INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','02','经理','1111111111111111',0)
GO
INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','03','领导','1111111111111111',0)
GO
INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','04','客服','1111111111111111',0)
GO
INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','05','用户','0000000000000000',0)
GO
INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','06','供应商','0000000000000000',0)
GO
INSERT INTO ROLERIGHT (orgno,roleno,userrole,rightName,datatype) VALUES ('001','07','客户','1100000000000000',0)
GO

INSERT INTO USERTYPE (orgno,usertypeno,usertypename,datatype) VALUES ('001','0','组织用户',1)
GO
INSERT INTO USERTYPE (orgno,usertypeno,usertypename,datatype) VALUES ('001','1','注册用户',1)
GO
INSERT INTO USERTYPE (orgno,usertypeno,usertypename,datatype) VALUES ('001','2','管理员',1)
GO
INSERT INTO USERTYPE (orgno,usertypeno,usertypename,datatype) VALUES ('001','3','客服人员',0)
GO
INSERT INTO USERTYPE (orgno,usertypeno,usertypename,datatype) VALUES ('001','4','用户',0)
GO
INSERT INTO USERTYPE (orgno,usertypeno,usertypename,datatype) VALUES ('001','5','供应商',0)
GO
INSERT INTO USERTYPE (orgno,usertypeno,usertypename,datatype) VALUES ('001','6','客户',0)
GO

INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (3,2)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (3,3)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (3,4)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (1,2)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (0,2)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (0,0)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (2,6)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (2,5)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (2,4)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (2,2)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (2,0)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (2,1)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (6,6)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (5,5)
GO
INSERT INTO USERTYPERIGHT (usertypeno,righttypeno) VALUES (4,4)
GO