


CREATE TABLE `ss_admin_menu_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(255) NOT NULL,
  `module` varchar(255) NOT NULL,
  `action` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

insert  into `ss_admin_menu_categories`(`id`,`category_name`,`module`,`action`) values (1,'Settings','mod_site','admin_dashboard'),(2,'Pages','mod_menu_item','admin_dashboard'),(3,'Contents','mod_article','admin_dashboard'),(4,'Layouts','mod_modules','index'),(5, 'Files', 'mod_filemanager', 'admin_dashboard'),(6,'Users','mod_user','admin_dashboard'),(7,'Licenses','mod_authorization','admin_list');

CREATE TABLE `ss_admin_menu_items` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(50) NOT NULL,
  `action` varchar(50) NOT NULL,
  `text` varchar(255) DEFAULT NULL,
  `level` int(11) NOT NULL DEFAULT '1',
  `priority` int(11) NOT NULL DEFAULT '10',
  `category_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `module` (`module`),
  KEY `priority` (`priority`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

insert  into `ss_admin_menu_items`(`id`,`module`,`action`,`text`,`level`,`priority`,`category_id`) values (1,'mod_article','admin_list','Articles',1,1,3),(3,'mod_friendlink','admin_list','Hot Links',1,5,1),(25,'mod_backup','admin_list','Data Bakup/Recovery',1,6,1),(6,'mod_product','admin_list','Products',1,2,3),(8,'mod_download','admin_list','Downloads',1,3,3),(9,'mod_static','admin_list','Static Contents',2,2,2),(10,'mod_qq','admin_list','Services',1,2,1),(12,'mod_message','admin_list','Messages',1,4,3),(13,'mod_menu_item','admin_list','Site Columns',1,1,2),(15,'mod_payaccount','admin_list','Payment Accounts',2,3,1),(16,'mod_order','admin_list','Orders',2,2,6),(19,'mod_statistics','admin_list','Statistics',1,4,1),(20,'mod_user','admin_list','Users',1,1,6),(22,'mod_navigation','admin_list','Homepage Guidances',1,3,2),(23,'mod_template','admin_list','Templates',1,4,2),(24,'mod_site','admin_list','Web Settings',1,1,1),(26, 'mod_attachment', 'admin_list', 'Image Watermark/Thumb', '1', '7', '1'),(27, 'mod_advert', 'admin_list','Advert Tool', '1', '8', '1'),(28,'mod_sitestarmaker','admin_list','Picture Tool','1','9','1'),(29, 'mod_bulletin', 'admin_list', 'Bulletins', '1', '5', '3');

CREATE TABLE `ss_admin_shortcuts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(50) NOT NULL,
  `action` varchar(50) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `priority` int(11) NOT NULL DEFAULT '10',
  PRIMARY KEY (`id`),
  KEY `module` (`module`),
  KEY `priority` (`priority`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_article_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `article_category_id` int(11) NOT NULL DEFAULT '0',
  `i_order` int(11) NOT NULL DEFAULT '0',
  `s_locale` varchar(50) NOT NULL,
  `published` enum('0','1') NOT NULL DEFAULT '1',
  `for_roles` varchar(50) NOT NULL DEFAULT '{guest}',
  PRIMARY KEY (`id`),
  KEY `alias` (`alias`),
  KEY `article_category_id` (`article_category_id`),
  KEY `i_order` (`i_order`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `author` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `i_order` int(11) NOT NULL DEFAULT '0',
  `source` text,
  `tags` varchar(255) DEFAULT NULL,
  `intro` text NOT NULL,
  `content` LongText,
  `create_time` bigint(20) NOT NULL,
  `s_locale` varchar(50) NOT NULL,
  `pub_start_time` bigint(20) NOT NULL,
  `pub_end_time` bigint(20) NOT NULL,
  `published` enum('0','1') NOT NULL DEFAULT '1',
  `for_roles` varchar(50) NOT NULL DEFAULT '{guest}',
  `v_num` bigint(20) NOT NULL DEFAULT '0',
  `article_category_id` int(11) NOT NULL,
  `is_seo` enum('0','1') DEFAULT '0',
  `description` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `create_time` (`create_time`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`),
  KEY `article_category_id` (`article_category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_bulletins` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL,
  `content` text,
  `create_time` bigint(20) NOT NULL,
  `s_locale` varchar(50) NOT NULL,
  `pub_start_time` bigint(20) NOT NULL,
  `pub_end_time` bigint(20) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  PRIMARY KEY  (`id`),
  KEY `title` (`title`),
  KEY `create_time` (`create_time`),
  KEY `s_locale` (`s_locale`),
  KEY `pub_start_time` (`pub_start_time`),
  KEY `pub_end_time` (`pub_end_time`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`),
  FULLTEXT KEY `content` (`content`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_delivery_addresses` (
  `id` int(11) NOT NULL auto_increment,
  `reciever_name` varchar(255) NOT NULL,
  `prov_id` varchar(6) NOT NULL,
  `city_id` varchar(6) NOT NULL,
  `dist_id` varchar(6) NOT NULL,
  `detailed_addr` text NOT NULL,
  `postal` varchar(6) NOT NULL,
  `phone` varchar(24) default NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`),
  KEY `prov_id` (`prov_id`),
  KEY `city_id` (`city_id`),
  KEY `dist_id` (`dist_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_delivery_methods` (
  `id` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_download_categories` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `i_order` int(11) NOT NULL default '0',
  `s_locale` varchar(50) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  PRIMARY KEY  (`id`),
  KEY `alias` (`alias`),
  KEY `i_order` (`i_order`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_downloads` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) default NULL,
  `create_time` bigint(20) NOT NULL,
  `pub_start_time` bigint(20) NOT NULL,
  `pub_end_time` bigint(20) NOT NULL,
  `s_locale` varchar(50) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  `download_category_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `create_time` (`create_time`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`),
  KEY `download_category_id` (`download_category_id`),
  FULLTEXT KEY `description` (`description`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_friendlinks` (
  `id` int(11) NOT NULL auto_increment,
  `fl_name` varchar(50) default NULL,
  `fl_img` varchar(50) default NULL,
  `fl_addr` varchar(255),
  `s_locale` varchar(50) NOT NULL,
  `create_time` bigint(20) NOT NULL,
  `for_roles` varchar(50) NOT NULL default '{guest}',
  `published` enum('0','1') NOT NULL default '1',
  `fl_type` char(1) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `for_roles` (`for_roles`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `create_time` (`create_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_languages` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL,
  `locale` varchar(50) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `locale` (`locale`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `ss_languages` VALUES (2,'简体中文','zh_CN','1');

CREATE TABLE `ss_menu_items` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `link` varchar(255) NOT NULL default '#',
  `mi_category` varchar(50) NOT NULL default 'outer_url',
  `link_type` varchar(50) NOT NULL default '',
  `selected_content` varchar(255) NOT NULL default '',
  `menu_item_id` int(11) NOT NULL default '0',
  `i_order` int(11) NOT NULL default '0',
  `s_locale` varchar(50) NOT NULL,
  `published` varchar(20) NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  `menu_id` int(11) NOT NULL default '0',
  `layout` varchar(100) NOT NULL default 'default',
  `meta_key` text,
  `meta_desc` text,
  `title` varchar(100) default '',
  PRIMARY KEY  (`id`),
  KEY `menu_item_id` (`menu_item_id`),
  KEY `i_order` (`i_order`),
  KEY `s_locale` (`s_locale`),
  KEY `for_roles` (`for_roles`),
  KEY `mi_category` (`mi_category`),
  KEY `published` (`published`),
  KEY `menu_id` (`menu_id`),
  KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_menus` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `s_locale` varchar(50) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  PRIMARY KEY  (`id`),
  KEY `name` (`name`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_messages` (
  `id` int(11) NOT NULL auto_increment,
  `username` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `tele` varchar(20) NOT NULL,
  `message` text NOT NULL,
  `create_time` bigint(20) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_navigations` (
  `id` int(11) NOT NULL auto_increment,
  `navigation` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `navigation` (`navigation`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

CREATE TABLE `ss_online_qqs` (
  `id` int(11) NOT NULL auto_increment,
  `account` varchar(255) NOT NULL,
  `category` enum('0','1','2','3','4','5','6') default NULL,
  `published` enum('0','1') NOT NULL default '1',
  `qqname` varchar(255) NOT NULL,
  `s_locale` varchar(50) NOT NULL default 'zh_CN',
   PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_onlinepay_histories` (
  `id` int(11) NOT NULL auto_increment,
  `user_id` int(11) NOT NULL,
  `outer_oid` varchar(255) NOT NULL,
  `payment_provider_id` int(11) NOT NULL,
  `send_time` bigint(20) NOT NULL,
  `return_time` bigint(20) NOT NULL,
  `finished` enum('0','1') NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`),
  KEY `outer_oid` (`outer_oid`),
  KEY `payment_provider_id` (`payment_provider_id`),
  KEY `send_time` (`send_time`),
  KEY `return_time` (`return_time`),
  KEY `finished` (`finished`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_order_products` (
  `id` int(11) NOT NULL auto_increment,
  `product_id` int(11) NOT NULL,
  `online_order_id` int(11) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_thumb` varchar(255) default NULL,
  `price` decimal(16,2) NOT NULL default '0.00',
  `amount` int(11) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_payment_accounts` (
  `id` int(11) NOT NULL auto_increment,
  `payment_provider_id` int(11) NOT NULL,
  `seller_site_url` varchar(255) default NULL,
  `seller_account` varchar(255) default NULL,
  `partner_id` varchar(255) NOT NULL,
  `partner_key` varchar(255) NOT NULL,
  `enabled` enum('0','1') NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `ss_payment_accounts` VALUES (1,1,'','','','',''),(2,2,'','','','',''),(6,6,'','','','',''),(7,7,'','','','',''),(8,8,'','','','',''),(9,9,'','','','','');
INSERT INTO `ss_payment_accounts` VALUES (3, 3, '', '', '', '', '');
INSERT INTO `ss_payment_accounts` VALUES (4, 4, '', '', '', '', '');
INSERT INTO `ss_payment_accounts` VALUES (5, 5, '', '', '', '', '');

CREATE TABLE `ss_payment_providers` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `disp_name` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `ss_payment_providers` VALUES (1,'alipay','支付宝'),(2,'99bill','快钱'),(6,'alipaymed','支付宝中介担保'),(7,'alipayimd','支付宝即时到账'),(8,'paypalen','PayPal(外卡帐号)'),(9,'moneybookers','MONEYBOOKERS');
INSERT INTO `ss_payment_providers` VALUES (3, 'paypal', '中国贝宝');
INSERT INTO `ss_payment_providers` VALUES (4, 'tencentmed', '财付通中介担保');
INSERT INTO `ss_payment_providers` VALUES (5, 'tencentimd', '财付通立即到账');

CREATE TABLE `ss_product_categories` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `product_category_id` int(11) NOT NULL default '0',
  `i_order` int(11) NOT NULL default '0',
  `s_locale` varchar(50) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  PRIMARY KEY  (`id`),
  KEY `alias` (`alias`),
  KEY `product_category_id` (`product_category_id`),
  KEY `i_order` (`i_order`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_product_pics` (
  `id` int(11) NOT NULL auto_increment,
  `product_id` int(11) NOT NULL,
  `pic` varchar(255) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `product_id` (`product_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `ss_products` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `i_order` int(11) NOT NULL default '0',
  `feature_img` varchar(255) default NULL,
  `feature_smallimg` varchar(255) default NULL,
  `introduction` text NOT NULL,
  `description` longtext,
  `price` decimal(16,2) NOT NULL default '0.00',
  `discount_price` decimal(16,2) NOT NULL default '0.00',
  `delivery_fee` decimal(16,2) NOT NULL default '0.00',
  `online_orderable` enum('0','1') NOT NULL default '1',
  `recommended` enum('0','1') NOT NULL default '0',
  `create_time` bigint(20) NOT NULL,
  `product_category_id` int(11) NOT NULL default '0',
  `s_locale` varchar(50) NOT NULL,
  `pub_start_time` bigint(20) NOT NULL,
  `pub_end_time` bigint(20) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  `is_seo` enum('0','1') DEFAULT '0',
  `meta_key` text,
  `meta_desc` text,
  PRIMARY KEY  (`id`),
  KEY `name` (`name`),
  KEY `recommended` (`recommended`),
  KEY `create_time` (`create_time`),
  KEY `product_category_id` (`product_category_id`),
  KEY `s_locale` (`s_locale`),
  KEY `pub_start_time` (`pub_start_time`),
  KEY `pub_end_time` (`pub_end_time`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`),
  FULLTEXT KEY `description` (`description`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_roles` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(20) NOT NULL,
  `desc` varchar(255) NOT NULL,
 `permission`  text,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

INSERT INTO `ss_roles` VALUES (1,'guest','Guest',NULL),(2,'member','Member',NULL),(3,'admin','Admin',NULL);

CREATE TABLE `ss_site_infos` (
  `id` int(11) NOT NULL auto_increment,
  `site_name` varchar(255) default NULL,
  `keywords` varchar(255) default NULL,
  `description` text,
  `s_locale` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `s_locale` (`s_locale`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_static_contents` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL,
  `content` longtext,
  `create_time` bigint(20) NOT NULL,
  `s_locale` varchar(50) NOT NULL,
  `published` enum('0','1') NOT NULL default '1',
  `for_roles` varchar(50) NOT NULL default '{guest}',
  PRIMARY KEY  (`id`),
  KEY `title` (`title`),
  KEY `create_time` (`create_time`),
  KEY `s_locale` (`s_locale`),
  KEY `published` (`published`),
  KEY `for_roles` (`for_roles`),
  FULLTEXT KEY `content` (`content`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_template_categories` (
  `id` int(11) NOT NULL auto_increment,
  `category` varchar(50) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

CREATE TABLE `ss_templates` (
  `id` int(11) NOT NULL auto_increment,
  `template` varchar(50) NOT NULL,
  `template_category_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `template_category_id` (`template_category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_transactions` (
  `id` int(11) NOT NULL auto_increment,
  `amount` decimal(16,2) NOT NULL default '0.00',
  `type` enum('1','2') NOT NULL default '1',
  `memo` text,
  `action_time` bigint(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`),
  KEY `action_time` (`action_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_user_extends` (
  `id` int(11) NOT NULL auto_increment,
  `total_saving` decimal(16,2) NOT NULL default '0.00',
  `total_payment` decimal(16,2) NOT NULL default '0.00',
  `balance` decimal(16,2) NOT NULL default '0.00',
  `user_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_background_musics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `music_path` varchar(255) NOT NULL,
  `play` int(11) NOT NULL DEFAULT '1',
  `music_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_backups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` bigint(20) NOT NULL,
  `file_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `ss_marquees` (
  `id` int(11) NOT NULL auto_increment,
  `module_id` int(11) NOT NULL default '0' COMMENT '模块id',
  `marquee_type` enum('text','pic','picText') NOT NULL default 'pic' COMMENT '走马灯类型',
  `title` varchar(255) NOT NULL,
  `pic` varchar(255) NOT NULL,
  `flag` enum('1','2','3') NOT NULL default '1' COMMENT '1自定义2是库',
  `link` varchar(255) NOT NULL COMMENT '链接地址',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE `ss_user_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `field_type` int(11) NOT NULL,
  `showinlist` enum('0','1') NOT NULL DEFAULT '0',
  `required` enum('0','1') NOT NULL DEFAULT '0',
  `i_order` int(11) NOT NULL,
  `label` text NOT NULL,
  `options` text,
  PRIMARY KEY (`id`),
  KEY `i_order` (`i_order`),
  KEY `list_with_order` (`showinlist`,`i_order`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

INSERT INTO `ss_user_fields` (`id`, `field_type`, `showinlist`, `required`, `i_order`, `label`, `options`) VALUES (1, 0, '1', '0', 1, 'full_name', NULL),(2, 0, '0', '0', 3, 'nickname', NULL),(3, 0, '0', '0', 7, 'country', NULL),(4, 0, '0', '0', 8, 'city', NULL),(5, 0, '0', '0', 5, 'birthday', NULL),(6, 0, '0', '0', 9, 'addr1', NULL),(7, 0, '0', '0', 10, 'zipcode', NULL),(8, 0, '1', '0', 2, 'mobile', NULL),(9, 0, '0', '0', 4, 'gender', NULL),(10, 0, '0', '0', 6, 'telphone', NULL);

CREATE TABLE `ss_third_accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_type` varchar(50) NOT NULL,
  `appid` varchar(100) NOT NULL DEFAULT '',
  `appsecret` varchar(100) NOT NULL DEFAULT '',
  `active` smallint(6) NOT NULL DEFAULT '0',
  `options` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_type` (`account_type`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

CREATE TABLE `ss_emails` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(100) NOT NULL,
  `content` text NOT NULL,
  `user_id` int(6) NOT NULL,
  `user_name` varchar(30) NOT NULL,
  `is_mail` tinyint(1) NOT NULL,
  `send_id` int(6) NOT NULL,
  `is_read` tinyint(1) NOT NULL,
  `is_ok` tinyint(1) NOT NULL default '1',
  `create_time` varchar(20) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=42 ;