Phases 0–18: core meetings, webinar, breakouts, team chat, live streaming, town hall, billing, and Ladill Mail calendar wiring. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Concerns\BelongsToOwner;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Transcript extends Model
|
||||
{
|
||||
use BelongsToOwner;
|
||||
|
||||
protected $table = 'meet_transcripts';
|
||||
|
||||
protected $fillable = [
|
||||
'uuid', 'owner_ref', 'session_id', 'recording_id', 'status',
|
||||
'content', 'segments', 'live_captions_enabled',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['segments' => 'array', 'live_captions_enabled' => 'boolean'];
|
||||
}
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::creating(function (Transcript $transcript) {
|
||||
if (empty($transcript->uuid)) {
|
||||
$transcript->uuid = (string) Str::uuid();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function session(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Session::class, 'session_id');
|
||||
}
|
||||
|
||||
public function recording(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Recording::class, 'recording_id');
|
||||
}
|
||||
|
||||
public function aiSummary(): HasOne
|
||||
{
|
||||
return $this->hasOne(AiSummary::class, 'transcript_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user