

CREATE TABLE `zjmanagelogs` (
  `id` int(11) NOT NULL auto_increment COMMENT '',
  `user` char(100) NOT NULL COMMENT '',
  `descript` char(250) NOT NULL COMMENT 'Ϊ',
  `datetime` datetime NOT NULL COMMENT 'ʱ',
  `comment` varchar(250) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='̨־' AUTO_INCREMENT=1 ;



CREATE TABLE `zjmoneylogs` (
  `id` int(11) NOT NULL auto_increment COMMENT '',
  `author` int(8) NOT NULL COMMENT 'ID',
  `goldcontent` int(8) NOT NULL COMMENT 'ҲĿ',
  `silvercontent` int(8) NOT NULL COMMENT 'ҲĿ',
  `moneyactid` int(8) NOT NULL COMMENT 'ĿID',
  `datetime` datetime NOT NULL COMMENT 'ʱ',
  `descript` varchar(100) NOT NULL COMMENT '˵',
  `comment` varchar(200) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Ҳ־' AUTO_INCREMENT=1 ;



CREATE TABLE `zjnewmessages` (
  `id` int(11) NOT NULL auto_increment COMMENT '',
  `userid` int(8) NOT NULL COMMENT 'ID',
  `themesid` int(8) NOT NULL COMMENT 'ID',
  `adds` varchar(50) NOT NULL COMMENT '',
  `descript` text NOT NULL COMMENT '',
  `datetime` datetime NOT NULL COMMENT 'ʱ',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='б' AUTO_INCREMENT=1 ;



CREATE TABLE `zjnewpublish` (
  `id` int(11) NOT NULL auto_increment,
  `name` char(200) NOT NULL,
  `author` char(50) NOT NULL,
  `descript` text NOT NULL,
  `datetime` datetime NOT NULL,
  `views` int(8) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ϵͳ' AUTO_INCREMENT=1 ;




CREATE TABLE `zjnewsabout` (
  `id` int(11) NOT NULL auto_increment,
  `descript` text NOT NULL,
  `name` char(200) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='' AUTO_INCREMENT=1 ;



CREATE TABLE `zjphonesbrand` (
  `phonebrandid` int(11) NOT NULL auto_increment COMMENT '',
  `phonebrandname` char(100) NOT NULL COMMENT 'ֻƷ',
  `comment` varchar(250) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`phonebrandid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ֻƷо' AUTO_INCREMENT=1 ;



CREATE TABLE `zjphonesmodule` (
  `moduleid` int(11) NOT NULL auto_increment,
  `modulename` char(100) NOT NULL COMMENT 'ֻͺ',
  `brandid` int(8) NOT NULL COMMENT 'ֻƷ ZJPhonesBrand',
  `scrid` int(8) NOT NULL COMMENT 'ֻĻ ZJPhonesScreen',
  `osid` int(8) NOT NULL COMMENT 'ֻϵͳ ZJPhonesOS',
  `comment` varchar(250) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`moduleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ֻͺо' AUTO_INCREMENT=1 ;




CREATE TABLE `zjphonesos` (
  `osid` int(11) NOT NULL auto_increment COMMENT '',
  `osname` char(100) NOT NULL COMMENT 'ֻϵͳ',
  `enterprisename` varchar(100) NOT NULL COMMENT 'ֻϵͳ',
  `vernum` varchar(100) NOT NULL COMMENT 'ֻϵͳ汾',
  `comment` varchar(250) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`osid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ֻϵͳö' AUTO_INCREMENT=1 ;



CREATE TABLE `zjphonesscreen` (
  `scrid` int(11) NOT NULL auto_increment COMMENT '',
  `scrname` char(100) NOT NULL COMMENT 'ֻĻС',
  `scrwidth` int(8) NOT NULL COMMENT 'ֻĻС',
  `scrheight` int(8) NOT NULL COMMENT 'ֻĻС߶',
  `scrbit` int(8) NOT NULL COMMENT 'ֻĻСλ',
  `comment` varchar(250) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`scrid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ֻĻö' AUTO_INCREMENT=1 ;



CREATE TABLE `zjthemesgroup` (
  `id` int(11) NOT NULL auto_increment COMMENT '',
  `up` int(8) NOT NULL COMMENT '',
  `name` char(200) NOT NULL COMMENT '',
  `comment` varchar(250) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='' AUTO_INCREMENT=1 ;



INSERT INTO `zjthemesgroup` (`id`, `up`, `name`, `comment`) VALUES 
(1, 0, 'Abstract', ''),
(2, 0, 'Anime', ''),
(3, 0, 'Auto & Vehicles', ''),
(5, 0, 'Babes', ''),
(6, 0, 'Bollywood', ''),
(7, 0, 'Comedy', ''),
(8, 0, 'Designs', ''),
(9, 0, 'Drawn/Cartoons', ''),
(10, 0, 'Entertainment', ''),
(11, 0, 'Games', ''),
(12, 0, 'Holiday/Occasions', ''),
(13, 0, 'Hunks', ''),
(14, 0, 'Logos', ''),
(15, 0, 'Love', ''),
(16, 0, 'Music', ''),
(17, 0, 'Nature/Landscape', ''),
(18, 0, 'News & Politics', ''),
(19, 0, 'Other', ''),
(20, 0, 'People', ''),
(21, 0, 'Pets & Animals', ''),
(22, 0, 'Signs & Sayings', ''),
(23, 0, 'Spiritual', ''),
(24, 0, 'Sport', ''),
(25, 0, 'Technology', '');



CREATE TABLE `zjthemethemes` (
  `id` int(11) NOT NULL auto_increment COMMENT '',
  `name` char(200) NOT NULL COMMENT '',
  `author` char(100) NOT NULL COMMENT '',
  `groupid` int(8) NOT NULL COMMENT '(ZJThemesGroup)',
  `descript` text NOT NULL COMMENT '',
  `vernum` varchar(50) NOT NULL COMMENT '汾',
  `level` int(8) NOT NULL COMMENT 'û',
  `views` int(8) NOT NULL COMMENT '鿴',
  `donwload` int(8) NOT NULL COMMENT '',
  `image` char(50) NOT NULL COMMENT 'Ԥͼ',
  `file` varchar(100) NOT NULL COMMENT 'λ',
  `time` datetime NOT NULL COMMENT 'ϴʱ',
  `downloadtime` datetime NOT NULL COMMENT 'صʱ',
  `moneygold` int(8) NOT NULL COMMENT '',
  `moneysilver` int(8) NOT NULL COMMENT '',
  `tops` tinyint(2) NOT NULL COMMENT 'Ƽ',
  `tname` varchar(512) NOT NULL COMMENT '֧ͺ',
  `comment` varchar(200) NOT NULL COMMENT 'ע',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='б' AUTO_INCREMENT=1 ;



CREATE TABLE `zjusercrossphones` (
  `userid` int(8) NOT NULL COMMENT 'ûΨһ־',
  `phoneid` int(8) NOT NULL COMMENT 'ֻͺ',
  `usedtime` int(8) NOT NULL COMMENT 'ûʹôֻصĴ',
  `firsttime` datetime NOT NULL COMMENT '״صʱ',
  `lasttime` datetime NOT NULL COMMENT 'صʱ',
  PRIMARY KEY  (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ûػʹùֻ';



CREATE TABLE `zjusersgroup` (
  `groupid` int(11) NOT NULL auto_increment COMMENT 'Ψһ־',
  `groupname` varchar(200) NOT NULL COMMENT '',
  `authorize` int(8) NOT NULL COMMENT 'ûȨ',
  PRIMARY KEY  (`groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='û' AUTO_INCREMENT=1 ;




CREATE TABLE `zjusersmembership` (
  `userid` int(11) NOT NULL auto_increment COMMENT 'ûΨһ־',
  `groupid` int(2) NOT NULL default '0' COMMENT 'û',
  `email` varchar(40) NOT NULL COMMENT '',
  `brandid` int(8) NOT NULL COMMENT 'ֻƷ',
  `moduleid` int(8) NOT NULL COMMENT 'ֻͺ',
  `phone` varchar(100) NOT NULL COMMENT 'ֻͺ',
  `created` datetime NOT NULL COMMENT 'ʱ',
  `lastlogin` datetime NOT NULL COMMENT '½ʱ',
  `IsApproved` tinyint(1) NOT NULL default '1' COMMENT 'ûǷԵ¼',
  `IsLockedOut` tinyint(1) NOT NULL default '0' COMMENT 'ûǷ',
  `username` char(50) NOT NULL COMMENT 'ʺ',
  `password` char(50) NOT NULL COMMENT '',
  `PasswordQuestion` varchar(100) NOT NULL COMMENT '',
  `PasswordAnswer` varchar(100) NOT NULL COMMENT '',
  `IsOnLine` tinyint(1) NOT NULL default '1' COMMENT 'Ƿ',
  `moneygold` int(8) NOT NULL COMMENT '',
  `moneysilver` int(8) NOT NULL COMMENT '',
  PRIMARY KEY  (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='û' AUTO_INCREMENT=1 ;



CREATE TABLE `zjusersprofile` (
  `userid` int(11) NOT NULL COMMENT 'ûΨһ־',
  `name` char(100) NOT NULL COMMENT 'û',
  `sex` tinyint(1) NOT NULL default '0' COMMENT 'Ա,012Ů',
  `birthday` varchar(100) NOT NULL COMMENT 'û',
  `comment` text NOT NULL COMMENT 'û',
  `mobile` varchar(100) NOT NULL COMMENT 'ֻ',
  KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='ûϸ';




CREATE TABLE `zjwapadmin` (
  `id` int(11) NOT NULL auto_increment COMMENT '',
  `username` char(100) NOT NULL COMMENT 'ʺ',
  `password` char(100) NOT NULL COMMENT '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='̨' AUTO_INCREMENT=1 ;

-- 
-- '̨ʺzjadmin 123456`
-- 

INSERT INTO `zjwapadmin` (`id`, `username`, `password`) VALUES 
(1, 'zjadmin', '7c4a8d09ca3762af61e59520943dc26494f8941b');
