Skip to content

post_logs 帖子-日志表

字段名字段类型字段注释默认值可空备注
idbigint UNSIGNED主键 IDNO自动递增
hpidvarchar(32)对外公开 IDNO唯一值
create_typetinyint UNSIGNED创建类型1NO1.快捷创建 / 2.编辑器创建 / 3.由帖子复原创建
user_idbigint UNSIGNED创建者 IDNO关联字段 users->id
post_idbigint UNSIGNED帖子 IDYES关联字段 posts->id
quoted_post_idbigint UNSIGNED引用帖子 IDYES关联字段 posts->id
为空代表无引用帖子
group_idint UNSIGNED小组 IDYES关联字段 groups->id
geotag_idint UNSIGNED地理 IDYES关联字段 geotags->id
titlevarchar(255)标题YES
contentlongtext内容YES完整内容
lang_tagvarchar(16)语言标签YES
is_markdowntinyint UNSIGNED内容是否为 MD 格式0NO0.否 / 1.是
is_anonymoustinyint UNSIGNED是否匿名0NO0.否 / 1.是
location_infojson位置信息YES
more_infojson更多信息字段YES
permissionsjson权限参数YES参考主表同名字段
is_enabledtinyint UNSIGNED是否有效1NO0.无效(仅自己可见) / 1.有效
statetinyint UNSIGNED状态1NO1.未发表(草稿)
2.已发表(审核中)
3.已发表(审核通过并封存)
4.已发表(审核未通过,又为草稿状态)
reasonvarchar(255)审核拒绝原因YES审核拒绝时使用
submit_attimestamp提交审核时间YES
created_attimestamp创建时间useCurrentNO比如 MySQL 默认值为 CURRENT_TIMESTAMP
updated_attimestamp更新时间YES
deleted_attimestamp删除时间YES

post_id 字段说明

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

location_info 完整信息

json
{
    "langTag": "",
    "name": "Cupertino Library",
    "description": "",
    "placeId": "TRDucfBPkhuzzR9a7",
    "placeType": "building",
    "mapId": 2,
    "latitude": 37.3185039,
    "longitude": -122.0288017,
    "continent": "North America",
    "continentCode": "NA",
    "country": "United States",
    "countryCode": "US",
    "region": "California",
    "regionCode": "CA",
    "city": "Santa Clara",
    "cityCode": "SC",
    "district": "Cupertino",
    "address": "10800 Torre Ave, Cupertino, CA 95014",
    "zip": "95014",
    "moreInfo": {}
}
json
{
    "langTag": "",
    "name": "东方之门",
    "description": "",
    "placeId": "B020017GRH",
    "placeType": "building",
    "mapId": 4,
    "latitude": 31.299,
    "longitude": 120.585,
    "continent": "亚洲",
    "continentCode": "AS",
    "country": "中国",
    "countryCode": "CN",
    "region": "江苏",
    "regionCode": "JS",
    "city": "苏州",
    "cityCode": "SZ",
    "district": "工业园区",
    "address": "苏州工业园区星港街199号",
    "zip": "215000",
    "moreInfo": {}
}

Released under the Apache-2.0 License