Files
gitlab-instance-0a899031_pa…/docs/COMMUNITY_MEMOS_SCHEMA.md
2026-03-15 04:26:05 -05:00

22 lines
963 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 私密社群 PocketBase 集合 schema
在 PocketBase 管理后台创建集合 `community_memos`,字段如下:
| 字段名 | 类型 | 必填 | 说明 |
|--------|------|------|------|
| user_id | Text | ✓ | 发布者 user_idPocketBase 用户 ID 或匿名 user123456 |
| content | Text | ✓ | 动态内容,支持 Markdown、#标签、图片 `![](url)` |
| pinned | Bool | | 是否置顶,默认 false |
| visibility | Text | | 可见性PRIVATE/PROTECTED/PUBLIC默认 PRIVATE |
| state | Text | | 状态NORMAL/ARCHIVED默认 NORMAL |
- 集合名:`community_memos`
- 列表/查看权限:仅服务端 admin 操作,前端通过 payjsapi `/community/memos` 接口访问
- 创建/更新/删除:仅 VIP 用户,由 payjsapi 校验
创建步骤:
1. 登录 PocketBase 管理后台
2. Collections → New collection → 名称 `community_memos`
3. 添加字段user_id (Text), content (Editor 或 Text), pinned (Bool)
4. 保存