opendb/opendb-news.md
2020-08-26 10:50:27 +08:00

3.3 KiB
Raw Permalink Blame History

文章&评论

文章表

表名opendb-news-articles

字段 类型 必填 描述
_id Object ID 存储文档 ID文章 ID系统自动生成
user_id String 文章作者ID 参考uni-id-users
category_id String 分类 id参考opendb-news-categories
title String 标题
content String 文章内容
excerpt String 文章摘录
article_status Integer 文章状态0 草稿箱 1 已发布
view_count Integer 阅读数量
like_count Integer 喜欢数、点赞数
is_sticky Boolean 是否置顶
is_essence Boolean 阅读加精
comment_status Integer 评论状态0 关闭 1 开放
comment_count Integer 评论数量
last_comment_user_id String 最后回复用户 id参考uni-id-users
avatar String 缩略图地址
publish_date Timestamp 发表时间
publish_ip String 发表时 IP 地址
last_modify_date Timestamp 最后修改时间
last_modify_ip String 最后修改时 IP 地址

文章类别

表名opendb-news-categories

字段 类型 必填 描述
_id Object ID 存储文档 ID文章 ID系统自动生成
name String 类别名称
description String 类别描述
icon String 类别图标地址
sort Integer 类别显示顺序
article_count Integer 该类别下文章数量
create_date Timestamp 创建时间

评论表

表名opendb-news-comments

字段 类型 必填 描述
_id Object ID 存储文档 ID文章 ID系统自动生成
article_id String 文章IDopendb-news-posts 表中的_id字段
user_id String 评论者ID参考uni-id-users
comment_content String 评论内容
like_count Integer 评论喜欢数、点赞数
comment_type Integer 回复类型: 0 针对文章的回复 1 针对评论的回复
reply_user_id String 被回复的评论用户IDcomment_type为1时有效
reply_comment_id String 被回复的评论IDcomment_type为1时有效
comment_date Timestamp 评论发表时间
comment_ip String 评论发表时 IP 地址