Skip to content

助力生态可持续发展

赞助 Fresns 发展

成为赞助者

session_logs 交互日志表

字段名字段类型字段注释默认值可空备注
idbigint UNSIGNED主键 IDNO自动递增
plugin_fskeyvarchar(64)关联插件名称FresnsNO关联字段 plugins->fskey
Fresns 代表是主程序的日志
typetinyint UNSIGNED日志类型1NO见下方描述
platform_idtinyint UNSIGNED平台编号NO关联键名 configs->item_key = platforms
versionvarchar(16)版本号NO语义化版本号
app_idchar(8)App IDYESsession_keys->app_id
lang_tagchar(16)客户端语言YES产生日志的语言,未开启多语言则留空
object_namevarchar(128)记录目标名称NO功能模型名或者接口路径
例如模型名 App\Models\Post
例如接口路径:/api/v2/account/login
object_actionvarchar(128)记录目标行为YES行为描述,自定义输入内容
object_resulttinyint UNSIGNED记录行为结果NO1.未知或执行中 / 2.成功 / 3.失败
object_order_idbigint UNSIGNED记录目标 IDYES例如发表行为,则代表发表内容的 ID
插件行为,凭此 ID 可查询对应插件那边记录的关联信息
device_infojson设备信息YES
device_tokenvarchar(128)设备 TokenYES例如 iOS Device Token 或 Android Device Token
可应用于推送消息
account_idbigint UNSIGNED账号 IDYES关联字段 accounts->id
user_idbigint UNSIGNED用户 IDYES关联字段 users->id
more_jsonjson备用字段YES例如存储操作行为快照
created_attimestamp创建时间CURRENT_TIMESTAMPNO
updated_attimestamp更新时间YES
deleted_attimestamp删除时间YES

日志类型 type

  • 1 自定义
  • 2 插件业务
  • 3 登录控制面板
  • 4 账号-注册
  • 5 账号-登录 object_order_id = session_tokens->id
  • 6 账号-修改资料
  • 7 账号-设置或重置密码
  • 8 账号-注销(删除)
  • 9 用户-新增
  • 10 用户-登录 object_order_id = session_tokens->id
  • 11 用户-修改资料
  • 12 用户-设置或重置密码
  • 13 用户-删除
  • 14 钱包-交易收入
  • 15 钱包-交易支出
  • 16 钱包-设置或重置密码
  • 17 帖子-创建草稿
  • 18 帖子-提交审核
  • 19 帖子-发表
  • 20 帖子-删除
  • 21 帖子日志-删除
  • 22 评论-创建草稿
  • 23 评论-提交审核
  • 24 评论-发表
  • 25 评论-删除
  • 26 评论日志-删除
  • 27 操作喜欢
  • 28 操作不喜欢
  • 29 操作关注
  • 30 操作屏蔽
  • 31 上传文件
  • 32 对话消息

设备信息 JSON

networkIpv4networkIpv6 必填一项,或者两项都填写。其余项可留空。

json
{
    "agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1",
    "type": "Desktop", // Desktop, Mobile, Tablet, Bot
    "mac": "2c:89:dc:71:b6:12",
    "brand": "Apple",
    "model": "Mac",
    "platformName": "Mac",
    "platformVersion": "10.15.7",
    "browserName": "Chrome",
    "browserVersion": "100.0.4896",
    "browserEngine": "Blink",
    "appImei": null, // 国际移动设备识别码
    "appAndroidId": null, // 安卓设备的唯一标识符
    "appOaid": null, // 开放匿名设备标识符
    "appIdfa": null, // 苹果设备广告标识符
    "simImsi": null, // 国际移动用户识别码
    "networkType": "wifi",
    "networkIpv4": "137.132.250.10",
    "networkIpv6": null,
    "networkPort": "8080",
    "networkTimezone": "Asia/Singapore",
    "networkOffset": 28800,
    "networkIsp": "National University of Singapore",
    "networkOrg": "National University of Singapore",
    "networkAs": "AS7472 NUS Information Technology",
    "networkAsName": "NUS-AS-AP",
    "networkReverse": null,
    "networkMobile": false,
    "networkProxy": false,
    "networkHosting": false,
    "mapId": 2, // 字典数据: 地图服务商编号
    "latitude": 1.29758,
    "longitude": 103.773,
    "scale": null,
    "continent": "Asia",
    "continentCode": "AS",
    "country": "Singapore",
    "countryCode": "SG",
    "region": "Central Singapore",
    "regionCode": "01",
    "city": "Singapore",
    "cityCode": "SG",
    "district": "Queenstown",
    "address": null,
    "zip": "119259"
}
{
    "agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1",
    "type": "Desktop", // Desktop, Mobile, Tablet, Bot
    "mac": "2c:89:dc:71:b6:12",
    "brand": "Apple",
    "model": "Mac",
    "platformName": "Mac",
    "platformVersion": "10.15.7",
    "browserName": "Chrome",
    "browserVersion": "100.0.4896",
    "browserEngine": "Blink",
    "appImei": null, // 国际移动设备识别码
    "appAndroidId": null, // 安卓设备的唯一标识符
    "appOaid": null, // 开放匿名设备标识符
    "appIdfa": null, // 苹果设备广告标识符
    "simImsi": null, // 国际移动用户识别码
    "networkType": "wifi",
    "networkIpv4": "137.132.250.10",
    "networkIpv6": null,
    "networkPort": "8080",
    "networkTimezone": "Asia/Singapore",
    "networkOffset": 28800,
    "networkIsp": "National University of Singapore",
    "networkOrg": "National University of Singapore",
    "networkAs": "AS7472 NUS Information Technology",
    "networkAsName": "NUS-AS-AP",
    "networkReverse": null,
    "networkMobile": false,
    "networkProxy": false,
    "networkHosting": false,
    "mapId": 2, // 字典数据: 地图服务商编号
    "latitude": 1.29758,
    "longitude": 103.773,
    "scale": null,
    "continent": "Asia",
    "continentCode": "AS",
    "country": "Singapore",
    "countryCode": "SG",
    "region": "Central Singapore",
    "regionCode": "01",
    "city": "Singapore",
    "cityCode": "SG",
    "district": "Queenstown",
    "address": null,
    "zip": "119259"
}