1 Star 0 Fork 1

Freeman Huang/qianyuanServer

forked from WooCloud/qianyuanServer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qianyuan.sql 12.05 KB
一键复制 编辑 原始数据 按行查看 历史
luka9001 提交于 2019-09-24 08:35 . feat(): 2019-09-24
/*
Navicat MySQL Data Transfer
Source Server : qianyuanMysql5.7
Source Server Version : 50727
Source Host : localhost:3306
Source Database : qianyuan
Target Server Type : MYSQL
Target Server Version : 50727
File Encoding : 65001
Date: 2019-09-24 08:32:12
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`social_message_id` int(11) NOT NULL COMMENT '关联的状态id',
`comment` varchar(255) DEFAULT NULL COMMENT '评论内容',
`from_user_id` int(11) NOT NULL COMMENT '谁发表的评论',
`to_user_id` int(11) NOT NULL COMMENT '评论谁',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `social_message_id` (`social_message_id`),
CONSTRAINT `comment_ibfk_1` FOREIGN KEY (`social_message_id`) REFERENCES `social_message` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Table structure for favoriteme
-- ----------------------------
DROP TABLE IF EXISTS `favoriteme`;
CREATE TABLE `favoriteme` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL COMMENT '连接uers表id',
`who_f_me_uid` int(11) DEFAULT NULL COMMENT '谁关注我',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `users_id` (`user_id`),
CONSTRAINT `favoriteme_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for favorites
-- ----------------------------
DROP TABLE IF EXISTS `favorites`;
CREATE TABLE `favorites` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL COMMENT '连接uers表id',
`favorite_uid` int(11) DEFAULT NULL COMMENT '关注哪个用户',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `users_id` (`user_id`),
CONSTRAINT `favorites_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for likes
-- ----------------------------
DROP TABLE IF EXISTS `likes`;
CREATE TABLE `likes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`social_message_id` int(11) DEFAULT NULL,
`liked_uid` int(11) DEFAULT NULL COMMENT '谁点赞了',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `users_id` (`social_message_id`),
CONSTRAINT `likes_ibfk_1` FOREIGN KEY (`social_message_id`) REFERENCES `social_message` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for matchmaker
-- ----------------------------
DROP TABLE IF EXISTS `matchmaker`;
CREATE TABLE `matchmaker` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`question` int(11) NOT NULL COMMENT '求助类型',
`detail` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '具体问题描述',
`deleted_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`wanted_uid` int(11) NOT NULL COMMENT '希望我们帮助去联系的用户',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Table structure for migrations
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`batch` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for oauth_access_tokens
-- ----------------------------
DROP TABLE IF EXISTS `oauth_access_tokens`;
CREATE TABLE `oauth_access_tokens` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`scopes` text COLLATE utf8mb4_unicode_ci,
`revoked` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`expires_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_access_tokens_user_id_index` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for oauth_auth_codes
-- ----------------------------
DROP TABLE IF EXISTS `oauth_auth_codes`;
CREATE TABLE `oauth_auth_codes` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`user_id` int(11) NOT NULL,
`client_id` int(11) NOT NULL,
`scopes` text COLLATE utf8mb4_unicode_ci,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for oauth_clients
-- ----------------------------
DROP TABLE IF EXISTS `oauth_clients`;
CREATE TABLE `oauth_clients` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`secret` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`redirect` text COLLATE utf8mb4_unicode_ci NOT NULL,
`personal_access_client` tinyint(1) NOT NULL,
`password_client` tinyint(1) NOT NULL,
`revoked` tinyint(1) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_clients_user_id_index` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for oauth_personal_access_clients
-- ----------------------------
DROP TABLE IF EXISTS `oauth_personal_access_clients`;
CREATE TABLE `oauth_personal_access_clients` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`client_id` int(11) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_personal_access_clients_client_id_index` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for oauth_refresh_tokens
-- ----------------------------
DROP TABLE IF EXISTS `oauth_refresh_tokens`;
CREATE TABLE `oauth_refresh_tokens` (
`id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`access_token_id` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`revoked` tinyint(1) NOT NULL,
`expires_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for password_resets
-- ----------------------------
DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for social_message
-- ----------------------------
DROP TABLE IF EXISTS `social_message`;
CREATE TABLE `social_message` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '发布信息',
`photos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`liked` int(11) DEFAULT '0',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
CONSTRAINT `social_message_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Table structure for test
-- ----------------------------
DROP TABLE IF EXISTS `test`;
CREATE TABLE `test` (
`test` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称',
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '邮箱账号',
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`realname` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '真实姓名',
`sex` tinyint(1) DEFAULT NULL COMMENT '性别 0男 1 女',
`birthplace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '籍贯',
`birthdate` date DEFAULT NULL COMMENT '出生日期',
`height` double DEFAULT NULL COMMENT '身高',
`education` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '学历',
`live` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '现居地',
`detail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '自我介绍',
`state` int(11) DEFAULT '0' COMMENT '实名状态 1 实名 0 未实名',
`greencard` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`divorce` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '电话号码',
`lifephoto` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '生活照',
`starsign` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '星座',
`deleted_at` timestamp NULL DEFAULT NULL,
`headimg` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
`marrystatus` int(11) DEFAULT NULL COMMENT '婚姻状况',
`smoke` int(11) DEFAULT NULL,
`drink` int(11) DEFAULT NULL,
`baby` int(11) DEFAULT NULL,
`nsex` int(11) DEFAULT NULL,
`nbirthdate` date DEFAULT NULL,
`nlive` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '对象现住址',
`nbirthplace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '对象籍贯',
`nheight` int(11) DEFAULT NULL,
`nmarrystatus` int(11) DEFAULT NULL,
`nbaby` int(11) DEFAULT NULL,
`nsmoke` int(11) DEFAULT NULL,
`ndrink` int(11) DEFAULT NULL,
`neducation` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`nincome` int(11) DEFAULT NULL,
`income` int(11) DEFAULT NULL,
`car` int(11) DEFAULT NULL,
`house` int(11) DEFAULT NULL,
`ncar` int(11) DEFAULT NULL,
`nhouse` int(11) DEFAULT NULL,
`language` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '语言能力',
`nlanguage` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '择偶条件语言能力',
`occupation` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '职业',
`noccupation` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '对象的职业',
`religion` int(11) DEFAULT NULL COMMENT '宗教信仰',
`nreligion` int(11) DEFAULT NULL COMMENT '对象的宗教信仰',
`hobby` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '爱好',
`nmaxheight` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/zhit/qianyuanServer.git
git@gitee.com:zhit/qianyuanServer.git
zhit
qianyuanServer
qianyuanServer
master

搜索帮助