Skip to content

post_logs

Column NameTypeCommentDefaultNullRemark
idbigint UNSIGNEDPrimary Key IDNOAuto Increment
hpidvarchar(32)Public IDNOUnique
create_typetinyint UNSIGNEDCreation type1NO1.Quick create / 2.Editor create / 3.Restore from post
user_idbigint UNSIGNEDAuthor IDNORelated field users->id
post_idbigint UNSIGNEDPost IDYESRelated field posts->id
quoted_post_idbigint UNSIGNEDQuoted post IDYESRelated field posts->id
group_idint UNSIGNEDGroup IDYESRelated field groups->id
geotag_idint UNSIGNEDGeotag IDYESRelated field geotags->id
titlevarchar(255)TitleYES
contentlongtextContentYESFull content
lang_tagvarchar(16)Language TagYES
is_markdowntinyint UNSIGNEDContent in MD format0NO0.No / 1.Yes
is_anonymoustinyint UNSIGNEDAnonymous0NO0.No / 1.Yes
location_infojsonLocation informationYESEmpty means not creating or clearing when modifying
more_infojsonMore InfoYESE.g. publisher IP location name, device name, etc.
permissionsjsonPermissionsYESReference master table
is_enabledtinyint UNSIGNEDIs Valid1NO0.Invalid (visible only to yourself) / 1.Valid
statetinyint UNSIGNEDStatus1NO1.Unpublished (draft)
2.Published (under review)
3.Published (approved and archived)
4.Published (not approved, draft status again)
reasonvarchar(255)Review rejection reasonYESUsed when review is rejected
submit_attimestampSubmit review timeYES
created_attimestampCreate TimeuseCurrentNOFor example, MySQL defaults to CURRENT_TIMESTAMP
updated_attimestampUpdate TimeYES
deleted_attimestampDelete TimeYES

post_id Field Description

  • Empty means a new draft, which may have more than one record, equivalent to the same author having more than one draft to publish.
  • If there is an ID
    • state=1, 2, 4 means that the existing content of the ID's post is being edited, and that no new drafts can be created for that ID, i.e. there can only be one draft being edited for the same post.
    • state=3 is the official version of the ID's post history, and there may be more than one.

location_info Complete Information

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": {}
}

Released under the Apache-2.0 License