Skip to content

post_logs 帖子-日志表

字段名字段类型字段注释默认值可空备注
idbigint UNSIGNED主键 IDNO自动递增
user_idbigint UNSIGNED创建者 IDNO关联字段 users->id
post_idbigint UNSIGNED帖子 IDYES关联字段 posts->id
parent_post_idbigint UNSIGNED父级帖子 IDYES关联字段 posts->id
为空代表无引用帖子
create_typetinyint UNSIGNED创建类型1NO1.快捷创建 / 2.编辑器创建 / 3.由帖子复原创建
is_plugin_editortinyint UNSIGNED是否仅在插件中编辑0NO0.否 / 1.是
editor_fskeyvarchar(64)内容编辑插件YES关联字段 plugins->fskey
group_idint UNSIGNED小组 IDYES关联字段 groups->id
titlevarchar(255)标题YES
contentlongtext内容YES完整内容
is_markdowntinyint UNSIGNED内容是否为 MD 格式0NO0.否 / 1.是
is_anonymoustinyint UNSIGNED是否匿名0NO0.否 / 1.是
is_comment_disabledtinyint UNSIGNED是否禁止评论0NO0.否 / 1.是
is_comment_privatetinyint UNSIGNED是否私有评论(私有仅帖子作者可见)0NO0.否 / 1.是
map_jsonjson位置信息YES为空值,代表不创建或者修改时清空
read_jsonjson阅读权限配置YES为空值,代表不创建或者修改时清空
user_list_jsonjson特定用户配置YES为空值,代表不创建或者修改时清空
comment_btn_jsonjson评论功能按钮设置YES为空值,代表不创建或者修改时清空
statetinyint UNSIGNED状态1NO1.未发表(草稿)
2.已发表(审核中)
3.已发表(审核通过并封存)
4.已发表(审核未通过,又为草稿状态)
reasonvarchar(255)审核拒绝原因YES审核拒绝时使用
submit_attimestamp提交审核时间YES
created_attimestamp创建时间CURRENT_TIMESTAMPNO作为草稿时创建时间
updated_attimestamp更新时间YES
deleted_attimestamp删除时间YES

post_id 字段说明

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

字段: map_json 位置信息

json
// 未注明字段的参数,不单独存字段,与完整 json 存入 post_appends->map_json
{
    "mapId": "post_appends->map_id",
    "latitude": "posts->map_latitude",
    "longitude": "posts->map_longitude",
    "scale": "post_appends->map_scale",
    "continent": "",
    "continentCode": "post_appends->map_continent_code",
    "country": "",
    "countryCode": "post_appends->map_country_code",
    "region": "",
    "regionCode": "post_appends->map_region_code",
    "city": "",
    "cityCode": "post_appends->map_city_code",
    "district": "",
    "address": "",
    "zip": "post_appends->map_zip",
    "poi": "",
    "poiId": "post_appends->map_poi_id",
}
json
{
    "mapId": 2,
    "latitude": 37.3185039,
    "longitude": -122.0288017,
    "scale": 14,
    "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",
    "poi": "Cupertino Library",
    "poiId": "TRDucfBPkhuzzR9a7",
}
json
{
    "mapId": 4,
    "latitude": 31.299,
    "longitude": 120.585,
    "scale": 6,
    "continent": "亚洲",
    "continentCode": "AS",
    "country": "中国",
    "countryCode": "CN",
    "region": "江苏",
    "regionCode": "JS",
    "city": "苏州",
    "cityCode": "SZ",
    "district": "工业园区",
    "address": "苏州工业园区星港街199号",
    "zip": "215000",
    "poi": "东方之门",
    "poiId": "B020017GRH",
}

字段: read_json 阅读权限配置

json
{
    "isReadLocked": "post_appends->is_read_locked",
    "btnName": [
        {
            "langTag": "en 语言标签",
            "name": "post_appends->read_btn_name 按钮名称"
        }
    ],
    "previewPercentage": "post_appends->read_pre_percentage",
    "permissions": {
        "users": [
            1, 2,
            "userId", "userId"
            // 发表时存入 post_auths->object_id
            // post_auths->type = 1
        ],
        "roles": [
            1, 2,
            "roleId", "roleId"
            // 发表时存入 post_auths->object_id
            // post_auths->type = 2
        ]
    },
    "pluginFskey": "post_appends->read_plugin_fskey"
}

字段: user_list_json 特定用户列表

json
{
    "isUserList": "post_appends->is_user_list",
    "userListName": [
        {
            "langTag": "en 语言标签",
            "name": "post_appends->user_list_name 特定用户名称"
        }
    ],
    "pluginFskey": "post_appends->user_list_plugin_fskey"
}

字段: comment_btn_json 评论设置

json
{
    "isCommentBtn": "post_appends->is_comment_btn",
    "btnName": [
        {
            "langTag": "en 语言标签",
            "name": "post_appends->comment_btn_name 按钮名称"
        }
    ],
    "pluginFskey": "post_appends->comment_btn_plugin_fskey"
}

Released under the Apache-2.0 License