开源中国 2018 年度最后一场技术盛会邀你来约~错过就要等明年啦!点此立即预约

宇润 / imi-demoPHPApache-2.0

Watch 3 Star 10 Fork 1
加入码云
与超过 300 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
IMI 框架的 Demo 展开 收起

db.sql 13.90 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
宇润 提交于 2018-09-21 09:28 . 更新demo
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1_3306
Source Server Version : 50553
Source Host : 127.0.0.1:3306
Source Database : db_test
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-09-21 09:27:54
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tb_article
-- ----------------------------
DROP TABLE IF EXISTS `tb_article`;
CREATE TABLE `tb_article` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(32) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_article
-- ----------------------------
INSERT INTO `tb_article` VALUES ('1', 'test', 'test');
INSERT INTO `tb_article` VALUES ('2', '222', '22222222222');
INSERT INTO `tb_article` VALUES ('3', '123', 'text');
INSERT INTO `tb_article` VALUES ('4', '123', 'text');
INSERT INTO `tb_article` VALUES ('5', '123', 'text');
INSERT INTO `tb_article` VALUES ('6', '123', 'text');
INSERT INTO `tb_article` VALUES ('11', '123', '456');
-- ----------------------------
-- Table structure for tb_avatar
-- ----------------------------
DROP TABLE IF EXISTS `tb_avatar`;
CREATE TABLE `tb_avatar` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(4) NOT NULL,
`relation_id` int(10) unsigned NOT NULL,
`url` varchar(255) NOT NULL COMMENT 'test',
PRIMARY KEY (`id`),
KEY `type` (`type`,`relation_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_avatar
-- ----------------------------
INSERT INTO `tb_avatar` VALUES ('1', '1', '1', 'http://www.baidu.com/update.jpg');
INSERT INTO `tb_avatar` VALUES ('2', '2', '1', 'http://www.baidu.com/2.jpg');
INSERT INTO `tb_avatar` VALUES ('3', '1', '15', 'http://www.baidu.com/73609522.jpg');
INSERT INTO `tb_avatar` VALUES ('5', '1', '17', 'http://www.baidu.com/1303375984.jpg');
-- ----------------------------
-- Table structure for tb_book
-- ----------------------------
DROP TABLE IF EXISTS `tb_book`;
CREATE TABLE `tb_book` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_book
-- ----------------------------
INSERT INTO `tb_book` VALUES ('1', '111');
-- ----------------------------
-- Table structure for tb_comment
-- ----------------------------
DROP TABLE IF EXISTS `tb_comment`;
CREATE TABLE `tb_comment` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`content` text NOT NULL,
`type` tinyint(4) NOT NULL,
`relation_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_comment
-- ----------------------------
INSERT INTO `tb_comment` VALUES ('1', '111', '2', '1');
INSERT INTO `tb_comment` VALUES ('2', '222', '1', '1');
INSERT INTO `tb_comment` VALUES ('3', '333', '1', '1');
INSERT INTO `tb_comment` VALUES ('4', '1', '1', '3');
INSERT INTO `tb_comment` VALUES ('5', '2', '1', '3');
INSERT INTO `tb_comment` VALUES ('6', '1', '1', '4');
INSERT INTO `tb_comment` VALUES ('7', '2', '1', '4');
-- ----------------------------
-- Table structure for tb_role
-- ----------------------------
DROP TABLE IF EXISTS `tb_role`;
CREATE TABLE `tb_role` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '角色ID',
`parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父级角色ID。顶级角色为0',
`name` varchar(255) DEFAULT NULL COMMENT '角色名称',
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_role
-- ----------------------------
INSERT INTO `tb_role` VALUES ('1', '0', 'a');
INSERT INTO `tb_role` VALUES ('2', '0', 'b');
INSERT INTO `tb_role` VALUES ('3', '0', 'c');
INSERT INTO `tb_role` VALUES ('4', '0', 'd');
INSERT INTO `tb_role` VALUES ('5', '0', 'e');
INSERT INTO `tb_role` VALUES ('6', '0', 'f');
INSERT INTO `tb_role` VALUES ('7', '0', 'g');
INSERT INTO `tb_role` VALUES ('8', '0', 'h');
INSERT INTO `tb_role` VALUES ('9', '0', 'i');
INSERT INTO `tb_role` VALUES ('10', '0', 'j');
INSERT INTO `tb_role` VALUES ('11', '0', 'k');
INSERT INTO `tb_role` VALUES ('12', '0', 'l');
INSERT INTO `tb_role` VALUES ('13', '0', 'm');
INSERT INTO `tb_role` VALUES ('14', '0', 'n');
INSERT INTO `tb_role` VALUES ('15', '0', 'o');
INSERT INTO `tb_role` VALUES ('16', '0', 'p');
INSERT INTO `tb_role` VALUES ('17', '0', 'q');
INSERT INTO `tb_role` VALUES ('18', '0', 'r');
INSERT INTO `tb_role` VALUES ('19', '0', 's');
INSERT INTO `tb_role` VALUES ('20', '0', 't');
INSERT INTO `tb_role` VALUES ('21', '0', 'u');
INSERT INTO `tb_role` VALUES ('22', '0', 'v');
INSERT INTO `tb_role` VALUES ('23', '0', 'w');
INSERT INTO `tb_role` VALUES ('24', '0', 'x');
INSERT INTO `tb_role` VALUES ('25', '0', 'y');
INSERT INTO `tb_role` VALUES ('26', '0', 'z');
-- ----------------------------
-- Table structure for tb_role_rule
-- ----------------------------
DROP TABLE IF EXISTS `tb_role_rule`;
CREATE TABLE `tb_role_rule` (
`role_id` int(10) unsigned NOT NULL COMMENT '角色ID',
`rule_id` int(10) unsigned NOT NULL COMMENT '权限规则ID',
PRIMARY KEY (`role_id`,`rule_id`),
KEY `rule_id` (`rule_id`),
KEY `role_id` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_role_rule
-- ----------------------------
INSERT INTO `tb_role_rule` VALUES ('1', '1');
INSERT INTO `tb_role_rule` VALUES ('1', '3');
INSERT INTO `tb_role_rule` VALUES ('1', '4');
INSERT INTO `tb_role_rule` VALUES ('1', '5');
-- ----------------------------
-- Table structure for tb_taggables
-- ----------------------------
DROP TABLE IF EXISTS `tb_taggables`;
CREATE TABLE `tb_taggables` (
`tag_id` int(10) unsigned NOT NULL,
`taggable_id` int(10) unsigned NOT NULL,
`taggable_type` tinyint(4) NOT NULL,
PRIMARY KEY (`tag_id`,`taggable_id`,`taggable_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_taggables
-- ----------------------------
INSERT INTO `tb_taggables` VALUES ('1', '1', '2');
INSERT INTO `tb_taggables` VALUES ('1', '10', '1');
INSERT INTO `tb_taggables` VALUES ('1', '11', '1');
INSERT INTO `tb_taggables` VALUES ('2', '10', '1');
INSERT INTO `tb_taggables` VALUES ('2', '11', '1');
INSERT INTO `tb_taggables` VALUES ('3', '1', '1');
-- ----------------------------
-- Table structure for tb_tags
-- ----------------------------
DROP TABLE IF EXISTS `tb_tags`;
CREATE TABLE `tb_tags` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_tags
-- ----------------------------
INSERT INTO `tb_tags` VALUES ('1', '标签1');
INSERT INTO `tb_tags` VALUES ('2', '标签2');
INSERT INTO `tb_tags` VALUES ('3', '标签3');
-- ----------------------------
-- Table structure for tb_team
-- ----------------------------
DROP TABLE IF EXISTS `tb_team`;
CREATE TABLE `tb_team` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(32) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_team
-- ----------------------------
INSERT INTO `tb_team` VALUES ('1', 'aa');
INSERT INTO `tb_team` VALUES ('2', 'bb');
INSERT INTO `tb_team` VALUES ('3', 'cc');
-- ----------------------------
-- Table structure for tb_test
-- ----------------------------
DROP TABLE IF EXISTS `tb_test`;
CREATE TABLE `tb_test` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`a` varchar(255) NOT NULL,
`b` varchar(255) NOT NULL,
`c` varchar(255) NOT NULL DEFAULT 'dsf',
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`bool` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`id`,`a`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_test
-- ----------------------------
INSERT INTO `tb_test` VALUES ('1', '0', '0', '0', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('2', '0', '0', '1', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('3', '1', '1', '1', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('7', 'aaa-1528337544', 'bbb', 'ccc', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('8', 'aaa-1528337618', 'bbb', 'ccc', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('9', 'aaa-1528337686', 'bbb', 'ccc', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('10', 'aaa-1528337739', 'bbb', 'ccc', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('11', '1528441855', '', '', '2018-09-14 11:15:00', '\0');
INSERT INTO `tb_test` VALUES ('12', '1', '2', '3', '2018-09-14 11:15:00', '\0');
-- ----------------------------
-- Table structure for tb_user
-- ----------------------------
DROP TABLE IF EXISTS `tb_user`;
CREATE TABLE `tb_user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL,
`age` tinyint(3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_user
-- ----------------------------
INSERT INTO `tb_user` VALUES ('1', 'ttt', '1');
INSERT INTO `tb_user` VALUES ('3', '111', '0');
INSERT INTO `tb_user` VALUES ('4', '222', '0');
INSERT INTO `tb_user` VALUES ('5', 'M4qARpXF', '0');
INSERT INTO `tb_user` VALUES ('6', '4PeCSovdZWb', '0');
INSERT INTO `tb_user` VALUES ('7', 'NOvUru', '0');
INSERT INTO `tb_user` VALUES ('8', 'eZoRGLfR', '0');
INSERT INTO `tb_user` VALUES ('9', 'UQx02PfSYnYMJ', '0');
INSERT INTO `tb_user` VALUES ('10', 'U6RBzC', '0');
INSERT INTO `tb_user` VALUES ('11', 'zjvBMohjo', '0');
INSERT INTO `tb_user` VALUES ('12', 'WDi06Wu', '0');
INSERT INTO `tb_user` VALUES ('13', 'W5J1jP', '0');
INSERT INTO `tb_user` VALUES ('14', 'WSb4nZyMx3gugo', '0');
INSERT INTO `tb_user` VALUES ('15', 'Ya6FNQlKZl', '0');
INSERT INTO `tb_user` VALUES ('17', 'xlBpk0Iu', '0');
-- ----------------------------
-- Table structure for tb_user_ex
-- ----------------------------
DROP TABLE IF EXISTS `tb_user_ex`;
CREATE TABLE `tb_user_ex` (
`user_id` int(10) unsigned NOT NULL,
`intro` text NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_user_ex
-- ----------------------------
INSERT INTO `tb_user_ex` VALUES ('1', '这个人很懒,什么也没留下-2018-09-20 14:58:25');
INSERT INTO `tb_user_ex` VALUES ('5', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('6', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('7', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('8', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('9', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('10', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('11', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('12', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('13', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('14', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('15', '这个人很懒,什么也没留下');
INSERT INTO `tb_user_ex` VALUES ('17', '这个人很懒,什么也没留下');
-- ----------------------------
-- Table structure for tb_user_friend
-- ----------------------------
DROP TABLE IF EXISTS `tb_user_friend`;
CREATE TABLE `tb_user_friend` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(10) unsigned NOT NULL,
`friend_user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_user_friend
-- ----------------------------
INSERT INTO `tb_user_friend` VALUES ('2', '1', '1');
-- ----------------------------
-- Table structure for tb_user_role
-- ----------------------------
DROP TABLE IF EXISTS `tb_user_role`;
CREATE TABLE `tb_user_role` (
`user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
`role_id` int(10) unsigned NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`,`role_id`),
KEY `user_id` (`user_id`),
KEY `role_id` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_user_role
-- ----------------------------
INSERT INTO `tb_user_role` VALUES ('2', '1');
INSERT INTO `tb_user_role` VALUES ('3', '2');
INSERT INTO `tb_user_role` VALUES ('4', '0');
INSERT INTO `tb_user_role` VALUES ('5', '0');
INSERT INTO `tb_user_role` VALUES ('6', '0');
INSERT INTO `tb_user_role` VALUES ('7', '0');
INSERT INTO `tb_user_role` VALUES ('8', '0');
INSERT INTO `tb_user_role` VALUES ('9', '0');
INSERT INTO `tb_user_role` VALUES ('10', '0');
-- ----------------------------
-- Table structure for tb_user_sns
-- ----------------------------
DROP TABLE IF EXISTS `tb_user_sns`;
CREATE TABLE `tb_user_sns` (
`user_id` int(10) unsigned NOT NULL,
`qq` varchar(11) NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of tb_user_sns
-- ----------------------------
INSERT INTO `tb_user_sns` VALUES ('1', '');
INSERT INTO `tb_user_sns` VALUES ('2', '');
INSERT INTO `tb_user_sns` VALUES ('5', '');
INSERT INTO `tb_user_sns` VALUES ('6', '');
INSERT INTO `tb_user_sns` VALUES ('7', '');
INSERT INTO `tb_user_sns` VALUES ('8', '');
INSERT INTO `tb_user_sns` VALUES ('9', '');
INSERT INTO `tb_user_sns` VALUES ('10', '');
INSERT INTO `tb_user_sns` VALUES ('11', '');
INSERT INTO `tb_user_sns` VALUES ('12', '');
INSERT INTO `tb_user_sns` VALUES ('13', '');
INSERT INTO `tb_user_sns` VALUES ('14', '');
INSERT INTO `tb_user_sns` VALUES ('15', '');
INSERT INTO `tb_user_sns` VALUES ('16', '');
INSERT INTO `tb_user_sns` VALUES ('17', '');

评论 ( 0 )

你可以在登录后,发表评论

搜索帮助