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
+4
View File
@@ -6,6 +6,7 @@ use app\note\controller\v1\Ai;
use app\note\controller\v1\Auth;
use app\note\controller\v1\Meta;
use app\note\controller\v1\Note;
use app\note\controller\v1\Share;
/**
* note 应用路由
@@ -19,6 +20,7 @@ use app\note\controller\v1\Note;
// v1 笔记模块接口规划(公开)
Route::get('v1/meta/interfaces', [Meta::class, 'interfaces']);
Route::post('v1/auth/wechat-login', [Auth::class, 'wechatLogin']);
Route::get('v1/share/read/:token', [Share::class, 'read']);
// v1 笔记模块接口(需登录)
Route::group('v1', function () {
@@ -30,7 +32,9 @@ Route::group('v1', function () {
Route::post('item/update/:id', [Note::class, 'update']);
Route::post('item/delete/:id', [Note::class, 'delete']);
Route::post('item/transcript/:id', [Note::class, 'transcript']);
Route::post('item/audio/:id', [Note::class, 'audio']);
Route::post('ai/summary/:id', [Ai::class, 'summary']);
Route::get('ai/summary/:id', [Ai::class, 'readSummary']);
Route::post('share/create/:id', [Share::class, 'create']);
})->middleware(\app\api\middleware\Auth::class);