Files
mini_tp/app/note/model/NoteAudio.php
T
nepiedg 36c506f4bf 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.
2026-04-17 10:33:33 +00:00

28 lines
480 B
PHP

<?php
declare(strict_types=1);
namespace app\note\model;
use think\Model;
/**
* note 模块录音附件模型
*/
class NoteAudio extends Model
{
protected $connection = 'dbnote';
protected $name = 'note_audio';
protected $pk = 'id';
protected $autoWriteTimestamp = false;
public static function findLatestByNoteId(int $noteId): ?self
{
return self::where('note_id', $noteId)
->order('id', 'desc')
->find();
}
}