Appearance
Author 作者体系插件
Author 插件提供跨内容类型的创作者画像层,支持作者入驻申请、等级体系、关注粉丝、冗余计数等能力。CMS/Flash/Community 等插件可共用作者画像。
插件信息
| 属性 | 值 |
|---|---|
| 名称 | author |
| 版本 | 0.1.0 |
| 描述 | 作者体系模块 -- 入驻申请/等级体系/事件驱动计数 |
| 管理面板 | 是 |
| 存储权限 | 是(沙箱前缀 author) |
核心能力
| 能力 | 说明 |
|---|---|
| 入驻申请 | 作者提交申请,管理员审核 |
| 等级体系 | L0-L3 四级认证(未认证/基础/中级/高级) |
| 关注粉丝 | 复用 user_follows 表,不自建 |
| 冗余计数 | 文章数/粉丝数/关注数冗余存储,事件驱动更新 |
| 跨插件复用 | CMS/Flash/Community 共用作者画像 |
事件
| 事件名 | 触发时机 |
|---|---|
author.application.submitted | 作者提交入驻申请 |
author.application.approved | 申请审核通过 |
author.application.rejected | 申请审核拒绝 |
author.profile.updated | 作者资料更新 |
author.level.changed | 等级变更 |
数据模型
AuthorProfile(作者画像)
表名: author_profiles
| 字段 | 类型 | 说明 |
|---|---|---|
| (BaseModel) | embedded | ID, TenantID, CreatorID, CreatedAt, UpdatedAt, DeletedAt |
| UserID | string | 关联用户 ID |
| PenName | string(200) | 笔名 |
| Bio | text | 个人简介 |
| Avatar | string(500) | 头像 URL |
| Domain | string(200) | 擅长领域 |
| CertLevel | int | 认证等级(0=L0未认证, 1=L1基础, 2=L2中级, 3=L3高级) |
| ArticleCount | int | 文章数(冗余) |
| FollowerCount | int | 粉丝数(冗余) |
| FollowingCount | int | 关注数(冗余) |
AuthorApplication(入驻申请)
表名: author_applications
| 字段 | 类型 | 说明 |
|---|---|---|
| (BaseModel) | embedded | ID, TenantID, CreatorID, CreatedAt, UpdatedAt, DeletedAt |
| UserID | string | 申请用户 ID |
| PenName | string(200) | 申请笔名 |
| Bio | text | 申请简介 |
| Status | string(20) | 状态(pending/approved/rejected) |
| ReviewNote | text | 审核备注 |
| ReviewedAt | timestamp | 审核时间 |
| ReviewedBy | string | 审核人 ID |
API 端点
公开接口
GET /api/v1/authors # 作者列表
GET /api/v1/authors/:id # 作者详情
GET /api/v1/authors/:id/articles # 作者文章列表管理接口(需认证)
GET /api/v1/admin/authors # 作者列表(管理)
GET /api/v1/admin/authors/:id # 作者详情(管理)
PUT /api/v1/admin/authors/:id # 更新作者资料
POST /api/v1/admin/author-applications # 审核申请
GET /api/v1/admin/author-applications # 申请列表C 端接口(需认证)
POST /api/v1/me/author-application # 提交入驻申请
GET /api/v1/me/author-profile # 获取我的作者资料权限点
| 权限 | 说明 |
|---|---|
author.read | 查看作者 |
author.write | 编辑作者 |
author.application.review | 审核入驻申请 |
与其他模块关系
| 模块 | 关系 |
|---|---|
| user | 作者关联用户,复用 user_follows |
| cms | 文章关联作者,事件驱动计数 |
| flash | 快讯可关联作者 |
| community | 帖子可关联作者 |

