app端:注册登录、搜索好友、好友申请、同意拒绝、好友聊天、地图定位、地图显示运动轨迹、轨迹分享动态、查看轨迹动态、评论/点赞动态、邀请好友一起同步跑步、账号维护(个人信息、头像、密码等)
注册登录
修改个人信息/我的个人中心
查找好友/申请好友
同意/拒绝
好友列表
好友聊天
定位位置/跑步运动轨迹
分享运动轨迹动态
动态列表
评论运动轨迹动态
约好友一起跑步
好友一起跑步中
mysql数据库表结构如下:
-- ----------------------------
-- Table structure for t_appointment_info
-- ----------------------------
DROP TABLE IF EXISTS `t_appointment_info`;
CREATE TABLE `t_appointment_info` (
`id` varchar(32) NOT NULL,
`form_user_id` varchar(32) DEFAULT NULL,
`to_user_id` varchar(32) DEFAULT NULL,
`time` datetime DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`status` int(1) DEFAULT NULL COMMENT '未跑,结束',
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='约跑请求表';
-- ----------------------------
-- Table structure for t_friends_apply
-- ----------------------------
DROP TABLE IF EXISTS `t_friends_apply`;
CREATE TABLE `t_friends_apply` (
`apply_id` varchar(32) NOT NULL,
`form_user` varchar(32) DEFAULT NULL COMMENT '申请者',
`to_user` varchar(32) DEFAULT NULL COMMENT '被申请者',
`status` int(1) DEFAULT NULL COMMENT '状态,0:未同意、1:同意、-1:拒绝',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`apply_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for t_friend_chat
-- ----------------------------
DROP TABLE IF EXISTS `t_friend_chat`;
CREATE TABLE `t_friend_chat` (
`chat_id` varchar(32) NOT NULL,
`form_user` varchar(32) DEFAULT NULL,
`to_user` varchar(255) DEFAULT NULL,
`content` varchar(2000) DEFAULT NULL,
`type` int(1) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`chat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for t_sys_user_basic_info
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_user_basic_info`;
CREATE TABLE `t_sys_user_basic_info` (
`sys_user_id` varchar(32) NOT NULL,
`code` varchar(32) DEFAULT NULL COMMENT '用户编码',
`nice` varchar(50) DEFAULT NULL COMMENT '昵称',
`face` varchar(255) DEFAULT NULL COMMENT '头像',
`sex` int(1) DEFAULT NULL COMMENT '性别',
`birthday` date DEFAULT NULL COMMENT '生日',
`phone` varchar(11) DEFAULT NULL COMMENT '手机号码',
`school_id` varchar(32) DEFAULT NULL COMMENT '学校编号',
`grade` varchar(255) DEFAULT NULL COMMENT '年级与班级',
`address` varchar(100) DEFAULT NULL COMMENT '地址',
`email` varchar(50) DEFAULT NULL COMMENT '邮箱地址',
`type` int(1) DEFAULT NULL COMMENT '用户类型,0:后台、1:APP',
`qq` varchar(255) DEFAULT NULL,
`weixin` varchar(255) DEFAULT NULL,
`sign` varchar(1) DEFAULT NULL COMMENT '雷达标记',
`online` int(1) DEFAULT NULL COMMENT '在线状态',
`balance` double(8,4) DEFAULT NULL,
`token` varchar(255) DEFAULT NULL COMMENT '设备指纹',
`position_id` varchar(32) DEFAULT NULL COMMENT '职位号',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`create_date` int(8) DEFAULT NULL COMMENT '创建日期',
`last_update_time` datetime DEFAULT NULL COMMENT '最后更新时间',
`last_update_date` int(8) DEFAULT NULL COMMENT '最后更新日期',
PRIMARY KEY (`sys_user_id`) USING BTREE,
KEY `code` (`code`),
KEY `type` (`type`),
KEY `sign` (`sign`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统用户基本信息表';
-- ----------------------------
-- Table structure for t_trends_comment
-- ----------------------------
DROP TABLE IF EXISTS `t_trends_comment`;
CREATE TABLE `t_trends_comment` (
`comment_id` varchar(32) NOT NULL,
`trends_id` varchar(32) DEFAULT NULL,
`content` varchar(255) DEFAULT NULL,
`sys_user_id` varchar(32) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`comment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for t_trends_give
-- ----------------------------
DROP TABLE IF EXISTS `t_trends_give`;
CREATE TABLE `t_trends_give` (
`give_id` varchar(255) NOT NULL,
`trends_id` varchar(32) DEFAULT NULL,
`sys_user_id` varchar(32) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`give_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for t_trends_images
-- ----------------------------
DROP TABLE IF EXISTS `t_trends_images`;
CREATE TABLE `t_trends_images` (
`images_id` varchar(32) NOT NULL,
`path` varchar(255) DEFAULT NULL,
`trends_id` varchar(32) DEFAULT NULL,
`width` int(11) DEFAULT NULL,
`height` int(11) DEFAULT NULL,
PRIMARY KEY (`images_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for t_trends_info
-- ----------------------------
DROP TABLE IF EXISTS `t_trends_info`;
CREATE TABLE `t_trends_info` (
`trends_id` varchar(32) NOT NULL,
`sys_user_id` varchar(32) DEFAULT NULL,
`content` varchar(255) DEFAULT NULL,
`type` int(1) DEFAULT NULL COMMENT '单人、双人',
`appointment_id` varchar(32) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
PRIMARY KEY (`trends_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='动态表';
-- ----------------------------
-- Table structure for t_trends_trajectory
-- ----------------------------
DROP TABLE IF EXISTS `t_trends_trajectory`;
CREATE TABLE `t_trends_trajectory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`trends_id` varchar(32) DEFAULT NULL,
`records` longtext,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='动态轨迹表';
-- ----------------------------
-- Table structure for t_user_friends
-- ----------------------------
DROP TABLE IF EXISTS `t_user_friends`;
CREATE TABLE `t_user_friends` (
`id` varchar(32) NOT NULL,
`sys_user_id` varchar(32) DEFAULT NULL,
`friend_id` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;