Skip to content
On this page

comment_logs

Column NameTypeCommentDefaultNullRemark
idbigint UNSIGNEDPrimary Key IDNO自动递增
user_idbigint UNSIGNED创建者 IDNO关联字段 users->id
comment_idbigint UNSIGNED评论 IDYES关联字段 comments->id
post_idbigint UNSIGNED帖子 IDNO关联字段 posts->id
parent_comment_idbigint UNSIGNED父级评论 IDYES关联字段 comments->id
为空代表一级评论
create_typetinyint UNSIGNED创建类型1NO1.快捷创建 / 2.编辑器创建 / 3.由帖子复原创建
is_plugin_editortinyint UNSIGNED是否仅在插件中编辑0NO0.否 / 1.是
editor_unikeyvarchar(64)内容编辑插件YES关联字段 plugins->unikey
contentlongtext内容YES完整内容
is_markdowntinyint UNSIGNED内容是否为 MD 格式0NO0.否 / 1.是
is_anonymoustinyint UNSIGNED是否匿名0NO0.否 / 1.是
map_jsonjson位置信息YES为空值,代表不创建或者修改时清空
statetinyint UNSIGNED状态1NO1.未发表(草稿)
2.已发表(审核中)
3.已发表(审核通过并封存)
4.已发表(审核未通过,又为草稿状态)
reasonvarchar(255)审核拒绝原因YES审核拒绝时使用
submit_attimestamp提交审核时间YES
created_attimestampCreate TimeCURRENT_TIMESTAMPNO
updated_attimestampUpdate TimeYES
deleted_attimestampDelete TimeYES

comment_id 字段说明

  • 为空代表新评论草稿,可以有多条记录,相当于同一位创建者有多条待发表草稿。
  • 有 ID 时
    • state=1、2、4 代表编辑该 ID 评论现有内容,该 ID 不可再创建新草稿,相当于同一篇评论只能有一篇正在编辑的草稿。
    • state=3 代表该 ID 评论的历史正式版本,可能有多个。

post_id 字段说明

  • 不能为空,记录该评论属于哪条帖子。
  • 只有一级评论可以有草稿,子级评论不能生产草稿,所以 comment_id 不是父级评论 ID。
  • state=1、2、4 代表未发表的评论,此时不能再创建该帖子的评论草稿。相当于同一篇帖子只能产生一条评论草稿。
  • state=3,此时 comment_id 被补齐,表示该 comment_id 的历史版本。

字段: 位置信息 map_json

json
{
    "mapId": "posts > map_id",
    "latitude": "posts > map_latitude",
    "longitude": "posts > map_longitude",
    "scale": "post_appends > map_scale",
    "continent": "Asia", // 不单独存字段,会随着完整 json 存入 post_appends->map_json
    "continentCode": "post_appends > map_continent_code",
    "country": "China",
    "countryCode": "post_appends > map_country_code",
    "region": "Jiangsu",
    "regionCode": "post_appends > map_region_code",
    "city": "post_appends > map_city",
    "cityCode": "post_appends > map_city_code",
    "district": "",
    "address": "",
    "zip": "post_appends > map_zip",
    "poi": "post_appends > map_poi",
    "poiId": "post_appends > map_poi_id",
}

Released under the Apache-2.0 License