Skip to content

comment_logs

Column NameTypeCommentDefaultNullRemark
idbigint UNSIGNEDPrimary Key IDNOAuto Increment
hcidvarchar(32)Public IDNOUnique
create_typetinyint UNSIGNEDCreation type1NO1.Quick creation / 2.Editor creation / 3.Recovered from post
user_idbigint UNSIGNEDAuthor IDNORelated field users->id
post_idbigint UNSIGNEDPost IDNORelated field posts->id
comment_idbigint UNSIGNEDComment IDYESRelated field comments->id
parent_comment_idbigint UNSIGNEDParent Comment IDYESRelated field comments->id
Empty means a top-level comment
geotag_idint UNSIGNEDGeotag IDYESRelated field geotags->id
contentlongtextContentYESFull content
lang_tagvarchar(16)Language TagYES
is_markdowntinyint UNSIGNEDContent in MD format0NO0.No / 1.Yes
is_anonymoustinyint UNSIGNEDAnonymous0NO0.No / 1.Yes
is_privatetinyint UNSIGNEDPrivate0NO0.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 (Rejected, back to draft status)
reasonvarchar(255)Review rejection reasonYESUsed when rejected in review
submit_attimestampSubmit review timeYES
created_attimestampCreate TimeuseCurrentNOFor example, MySQL defaults to CURRENT_TIMESTAMP
updated_attimestampUpdate TimeYES
deleted_attimestampDelete TimeYES

comment_id Field Description

  • If empty, it represents a new comment draft, and there can be multiple records, equivalent to a single author having multiple drafts waiting to be published.
  • When there is an ID:
    • state=1, 2, or 4 means editing the existing content of the comment with that ID. No new drafts can be created for that ID, which is equivalent to having only one draft being edited for the same comment.
    • state=3 represents the historical official versions of the comment with that ID, which can have multiple instances.

post_id Field Description

  • Cannot be empty, as it records to which post the comment belongs.
  • Only top-level comments can have drafts; child comments cannot generate drafts, so the comment_id is not the parent comment ID.
  • state=1, 2, or 4 represents unpublished comments, and at this time, no new comment drafts for that post can be created. This is equivalent to having only one comment draft for the same post.
  • state=3, at this time, the comment_id is completed, indicating the historical versions of the comment with that comment_id.

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