1、創建數據庫
/*
Navicat MySQL Data Transfer
Source Server : 本地連接
Source Server Version : 50617
Source Host : localhost:3306
Source Database : crm
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2015-06-29 23:55:28
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for think_users
-- ----------------------------
DROP TABLE IF EXISTS `think_users`;
CREATE TABLE `think_users` (
`userid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '用戶id',
`companyid` mediumint(8) unsigned NOT NULL COMMENT '公司id',
`pid` mediumint(8) NOT NULL COMMENT '父id',
`username` char(20) NOT NULL DEFAULT '' COMMENT '用戶名',
`password` char(32) NOT NULL DEFAULT '' COMMENT '密碼',
`nickname` char(20) NOT NULL DEFAULT '' COMMENT '昵稱',
`regdate` int(10) unsigned NOT NULL COMMENT '注冊時間',
`lastdate` int(10) unsigned NOT NULL COMMENT '最后一次登錄時間',
`regip` char(15) NOT NULL DEFAULT '' COMMENT '注冊ip',
`lastip` char(15) NOT NULL DEFAULT '' COMMENT '最后一次登錄ip',
`loginnum` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '登錄次數',
`email` char(32) NOT NULL DEFAULT '' COMMENT '郵箱',
`mobile` char(11) NOT NULL DEFAULT '' COMMENT '手機號碼',
`islock` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否鎖定',
`vip` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否會員',
`overduedate` int(10) unsigned NOT NULL COMMENT '賬戶過期時間',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '狀態-用於軟刪除',
PRIMARY KEY (`userid`),
UNIQUE KEY `username` (`username`) USING BTREE,
KEY `email` (`email`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;