operations 扩展资料表
| 字段名 | 字段类型 | 字段注释 | 默认值 | 可空 | 备注 |
|---|---|---|---|---|---|
| id | int UNSIGNED | 主键 ID | NO | 自动递增 | |
| type | tinyint UNSIGNED | 类型 | 1 | NO | 1.自定义 / 2.互动按钮图 / 3.勋章图标 / 4.提示文案 |
| code | varchar(32) | 代码 | NO | 纯小写英文 | |
| style | varchar(32) | 风格 | NO | primary / secondary / success / danger / warning / info | |
| name | varchar(128) | 名称 | YES | 多语言 | |
| description | text | 描述 | YES | 多语言 | |
| image_file_id | bigint UNSIGNED | 图片文件 ID | YES | 关联字段 files->id | |
| image_file_url | varchar(255) | 图片文件 URL | YES | ||
| image_active_file_id | bigint UNSIGNED | 二态图文件 ID | YES | 关联字段 files->id | |
| image_active_file_url | varchar(255) | 二态图文件 URL | YES | ||
| display_type | tinyint UNSIGNED | 展示类型 | 1 | NO | 1.基础 / 2.功能(插件) |
| plugin_fskey | varchar(64) | 关联插件 | NO | 关联字段 plugins->fskey 哪个插件创建的,也是功能用途的插件页 | |
| is_enabled | tinyint UNSIGNED | 是否有效 | 1 | NO | 0.无效 / 1.有效 |
| created_at | timestamp | 创建时间 | CURRENT_TIMESTAMP | NO | |
| updated_at | timestamp | 更新时间 | YES | ||
| deleted_at | timestamp | 删除时间 | YES |
code 用途编码
1自定义customizes2互动按钮图buttonIconslike点赞图标dislike点踩图标follow关注图标block屏蔽图标comment评论图标share分享图标more更多图标
3个性装饰图diversifyImagestitle标题图- 用户: 例如「联名」「小店」「徽章」等图标或功能图标
- 小组: 例如「开发者入驻」
- 话题: 例如「趋势」
- 帖子: 例如「投票」「抽奖」「商品」等标注帖子内容的图标
- 评论: 例如「神评」「优质评价」「热评」
decorate挂件图- 用户: 头像挂件
- 小组: 封面图挂件
- 话题: 封面图挂件
- 帖子: 角标挂件
- 评论: 角标挂件
verified认证图- 用户: 身份认证
- 小组: 官方认证
- 话题: 认证话题
- 帖子: 内容证实
- 评论: 内容证实
medal勋章图- 用户: 例如「徽章」
- 小组:
- 话题:
- 帖子: 例如「专业」
- 评论:
4提示文案tipsalert提示文本
除以上系统内置定义外,插件可自行定义,用户支持关联多个,用途编码可供客户端区分用途和显示位置。
接口输出示例
json
{
"operations": {
"customizes": [
{
"code": "operations->code",
"style": "operations->style",
"name": "operations->name",
"description": "operations->description",
"imageUrl": "operations->image_file_id 或 image_file_url",
"imageActiveUrl": "operations->image_active_file_id 或 image_active_file_url",
"displayType": "operations->display_type",
"pluginUrl": "operations->plugin_fskey",
}
],
"buttonIcons": [
{
"code": "operations->code",
"style": "operations->style",
"name": "operations->name",
"description": "operations->description",
"imageUrl": "operations->image_file_id 或 image_file_url",
"imageActiveUrl": "operations->image_active_file_id 或 image_active_file_url",
"displayType": "operations->display_type",
"pluginUrl": "operations->plugin_fskey",
}
],
"diversifyImages": [
{
"code": "operations->code",
"style": "operations->style",
"name": "operations->name",
"description": "operations->description",
"imageUrl": "operations->image_file_id 或 image_file_url",
"imageActiveUrl": "operations->image_active_file_id 或 image_active_file_url",
"displayType": "operations->display_type",
"pluginUrl": "operations->plugin_fskey",
}
],
"tips": [
{
"code": "operations->code",
"style": "operations->style",
"name": "operations->name",
"description": "operations->description",
"imageUrl": "operations->image_file_id 或 image_file_url",
"imageActiveUrl": "operations->image_active_file_id 或 image_active_file_url",
"displayType": "operations->display_type",
"pluginUrl": "operations->plugin_fskey",
}
],
}
}