feat(note): add audio upload and sharing functionality

- Introduced `note_audio` table for storing audio attachments related to notes.
- Implemented audio upload endpoint in `Note` controller to handle audio file uploads.
- Added sharing functionality with `note_share` table to manage share tokens and view counts.
- Updated API routes to include endpoints for audio uploads and share creation.
- Enhanced documentation to reflect new audio and sharing features.
This commit is contained in:
nepiedg
2026-04-17 10:33:33 +00:00
parent 84e1c0daac
commit 36c506f4bf
15 changed files with 507 additions and 8 deletions
+19
View File
@@ -48,14 +48,19 @@ class PlanningService
['method' => 'POST', 'path' => '/note/v1/item/update/:id', 'desc' => '更新笔记'],
['method' => 'POST', 'path' => '/note/v1/item/delete/:id', 'desc' => '删除笔记'],
['method' => 'POST', 'path' => '/note/v1/item/transcript/:id', 'desc' => '保存实时转写内容'],
['method' => 'POST', 'path' => '/note/v1/item/audio/:id', 'desc' => '上传录音附件'],
['method' => 'POST', 'path' => '/note/v1/ai/summary/:id', 'desc' => '发起 AI 总结'],
['method' => 'GET', 'path' => '/note/v1/ai/summary/:id', 'desc' => '查看 AI 总结结果'],
['method' => 'POST', 'path' => '/note/v1/share/create/:id', 'desc' => '生成分享标识'],
['method' => 'GET', 'path' => '/note/v1/share/read/:token', 'desc' => '读取分享内容'],
],
'suggested_tables' => [
'note_user',
'note_item',
'note_transcript',
'note_ai_summary',
'note_audio',
'note_share',
],
'development_priority' => [
'1. 先落小程序登录,打通微信 openid 与 JWT',
@@ -157,6 +162,20 @@ class PlanningService
'audio_duration_ms' => '当前累计录音时长,可选',
],
],
'audio' => [
'route' => 'POST /note/v1/item/audio/:id',
'request' => [
'audio' => '录音文件 multipart 字段,必填',
'audio_duration_ms' => '录音时长,可选',
],
],
'share' => [
'route' => 'POST /note/v1/share/create/:id',
'response' => [
'share_token' => '分享 token',
'share_path' => '小程序分享路径',
],
],
];
}