feat(followup-audio): review full dialogue and bind roles before extraction

This commit is contained in:
2026-10-10 14:25:03 +08:00
parent f015b26ae1
commit b4acad8510
14 changed files with 360 additions and 43 deletions
@@ -55,13 +55,15 @@ final class FollowupAudioController extends BaseAdminController
public function create()
{
return $this->handle(true, ['diagnosis_id', 'upload_id', 'recorded_at', 'model_key'], fn (array $p): array =>
return $this->handle(true, ['diagnosis_id', 'upload_id', 'recorded_at', 'model_key', 'channel_roles'], fn (array $p): array =>
Logic::create([
'diagnosis_id' => $this->positive($p, 'diagnosis_id'),
'upload_id' => $this->textValue($p, 'upload_id', 64),
'recorded_at' => $this->textValue($p, 'recorded_at', 19),
'model_key' => $this->textValue($p, 'model_key', 16),
], $this->adminId, $this->adminInfo));
// Preserve raw JSON type and exact enum, including null/whitespace rejection.
'channel_roles' => array_key_exists('channel_roles', $p) ? $p['channel_roles'] : 'unconfirmed',
], $this->adminId, $this->adminInfo), true);
}
public function lists()