$ npm install
# 启动本地reids
redis-server
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
nestjs+mysql
- 登陆注册
- 登陆 ✅
- github 登陆 ✅
- 登出 ✅
- 注册 ✅
- 找回密码 ✅
- 修改密码 ✅
- 验证邮箱 ✅
- 个人信息
- 获取 ✅
- 修改 ✅
- 关注和取消关注标签 ✅
- 关注 ✅
- 取消关注 ✅
- 获取关注的人 ✅
- 获取被关注的人 ✅
- 获取赞过文章的列表 ✅
- 文章
- 更新 ✅
- 创建 ✅
- 获取单一文章 ✅
- 获取所有文章列表 ✅
- 获取标签文章列表 ✅
- 获取用户文章列表 ✅
- 赞 ✅
- 取消赞 ✅
- 搜索 ✅
- 评论 ❌
- 删除 ✅
- 标签
- 获取所有标签 ✅
- 新增标签 ✅
- 删除标签 ✅
- 更新标签 ✅
- 分类
- 获取所有分类 ✅
- 新增分类 ✅
- 删除分类 ✅
- 更新分类 ✅
- 消息
- 获取未读消息 ❌
- 消息列表 ❌
- 私信
- 拉历史消息 ❌
- 发消息 ❌
- 基础
- 日志模块 ✅
- 发送邮件 ✅
- 接口权限管理 ❌
_id: "5e5bca2e6fb9a07c91101d44"
category: {id: "5562b428e4b00c57d9b94b9d", title: "article", name: "阅读"}
content: ""
createdAt: "2020-03-01T14:43:58.871Z"
english: false
entry: "5e5bcaa46fb9a07ce152cac8"
gfw: false
html: "<p>werwe13233werwerwerwer</p>↵"
isTitleImageFullscreen: "0"
markdown: "werwe13233werwerwerwer"
original: true
originalUrl: "https://juejin.im/post/5e5bca2e6fb9a07c91101d44"
screenshot: null
tags: [{title: "测试", id: "5597acede4b08a686ce6b36c"}]
title: "12323"
type: "markdown"
updatedAt: "2020-03-01T14:45:56.418Z"
url: "https://juejin.im/post/5e5bca2e6fb9a07c91101d44"
user: "58188c97d203090055d467a0"
verify: null
tagsTitleArray: ["测试"]
id: "5562b419e4b00c57d9b94ae2"
title: "前端"
createdAt: "2015-07-04T00:59:06Z"
updatedAt: "2017-06-18T23:34:05Z"
icon: "https://lc-gold-cdn.xitu.io/bac28828a49181c34110.png"
showOnNav: true
relationTagId: ""
isCategory: true
entryCount: 40489
subscribersCount: 419912
isSubscribe: true
CREATE TABLE com_wechat_user_follow
(
id
bigint(20) NOT NULL AUTO_INCREMENT,
uid
bigint(20) NOT NULL DEFAULT '0' COMMENT '用户 ID',
fid
bigint(20) NOT NULL DEFAULT '0' COMMENT '关注用户 ID',
status
bigint(20) NOT NULL DEFAULT '0' COMMENT '关注状态:是否取消关注等',
createtime
int(10) DEFAULT '0' COMMENT '关注时间',
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户关注表';
{
commentsCount: 7
id: "5e63906b518825493776079c"
tags: [{ngxCachedTime: 1583649682, ngxCached: true, title: "Vue.js", id: "555e9a98e4b00c57d9955f68",…}],
category:{},
createdAt: "2020-03-07T12:15:39.462Z",
updatedAt: "2020-03-07T12:15:39.462Z",
user:{
}
}
{
entryViewId: "5e63906bf265da571e26296d", // ?
entryId: "5e63906b518825493776079c", // ?
content:'', // 文章内容
transcodeContent:'', // 转义后
imageCache:{ // 应该是图片缓存地址
screenShot: null,
imageUrlArray: []
},
auto: false,
version: 2, // 版本
createdAt: "2020-03-07T12:15:39.462Z",
updatedAt: "2020-03-07T12:15:39.462Z",
}
{
id: '5e63ad0cf265da7550d25c9d';
content: '还是';
userId: '5da9915a51882562dc416c19';
respUser: '5dbe78766fb9a02075109419';
respComment: '';
userInfo: {
}
respUserInfo: {
}
likesCount: 0;
picList: [];
createdAt: '2020-03-07T14:17:48.594Z';
updatedAt: '2020-03-07T14:17:48.594Z';
subCount: 0;
replyCount: 0;
topComment: [];
isLiked: false;
}
1 数据库拿到的数据解构赋值后返回前端会影响到 entity 定义的 Exclude
Nest is MIT licensed.