
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- database: `secu_uniotp`
--

-- --------------------------------------------------------

--
-- table structure `commonloginfo`
--

CREATE TABLE IF NOT EXISTS `commonloginfo` (
  `optime` datetime NOT NULL,
  `operator` varchar(20) NOT NULL,
  `loglev` tinyint(4) NOT NULL,
  `optype` tinyint(4) NOT NULL,
  `remark` text NOT NULL,
  `domain` varchar(20) default NULL,
  `remoteip` varchar(16) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- data in table `commonloginfo`
--


-- --------------------------------------------------------

--
-- table structure `keyinfo`
--

CREATE TABLE IF NOT EXISTS `keyinfo` (
  `serialnum` varchar(20) NOT NULL,
  `userkey` varchar(20) NOT NULL,
  `hcounter` int(10) unsigned NOT NULL default '0',
  `lcounter` int(10) unsigned NOT NULL default '0',
  `tktype` tinyint(4) NOT NULL default '1' COMMENT 'type',
  `predate` datetime NOT NULL,
  `state` tinyint(4) default '0',
  `domain` varchar(20) default NULL,
  `importdate` datetime NOT NULL,
  `diglen` tinyint(4) NOT NULL default '6',
  `authwnd` int(11) NOT NULL default '30',
  `tmstep` int(11) NOT NULL default '60',
  PRIMARY KEY  (`serialnum`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


--
-- table structure `operatorinfo`
--

CREATE TABLE IF NOT EXISTS `operatorinfo` (
  `operatorid` int(10) unsigned NOT NULL,
  `passwd` char(40) NOT NULL,
  `operatorlev` tinyint(4) NOT NULL,
  `operatorname` varchar(20) NOT NULL,
  `domain` varchar(20) default NULL,
  PRIMARY KEY  (`operatorid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- data in table `operatorinfo`
--

INSERT INTO `operatorinfo` (`operatorid`, `passwd`, `operatorlev`, `operatorname`) VALUES
(1000000001, '7c4a8d09ca3762af61e59520943dc26494f8941b', 1, 'super_administrator');

-- --------------------------------------------------------

--
-- table `sysloginfo`
--

CREATE TABLE IF NOT EXISTS `sysloginfo` (
  `optime` datetime NOT NULL,
  `operator` varchar(20) NOT NULL,
  `loglev` tinyint(4) NOT NULL,
  `optype` tinyint(4) NOT NULL,
  `remark` text NOT NULL,
  `domain` varchar(20) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


--
-- table `userinfo`
--

CREATE TABLE IF NOT EXISTS `userinfo` (
  `username` varchar(20) NOT NULL,
  `userid` varchar(30) NOT NULL,
  `contacttel` varchar(20) NOT NULL,
  `islocked` tinyint(4) default '0',
  `failaccum` tinyint(4) default '0',
  `preusedate` datetime default NULL,
  `serialnum` varchar(20) default NULL,
  `isdeleted` tinyint(4) default '0',
  `remark` text,
  `user_email` varchar(30) default NULL,
  `domain` varchar(20) default NULL,
  `pin` varchar(20) NOT NULL,
  `authtype` tinyint(4) NOT NULL default '2',
  PRIMARY KEY  (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;