Deploy Ladill Meet / deploy (push) Failing after 7s
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>
48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<?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\HasMany;
|
|
use Illuminate\Support\Str;
|
|
|
|
class DirectConversation extends Model
|
|
{
|
|
use BelongsToOwner;
|
|
|
|
protected $table = 'meet_direct_conversations';
|
|
|
|
protected $fillable = ['uuid', 'owner_ref', 'organization_id', 'type', 'title'];
|
|
|
|
protected static function booted(): void
|
|
{
|
|
static::creating(function (DirectConversation $conversation) {
|
|
if (empty($conversation->uuid)) {
|
|
$conversation->uuid = (string) Str::uuid();
|
|
}
|
|
});
|
|
}
|
|
|
|
public function getRouteKeyName(): string
|
|
{
|
|
return 'uuid';
|
|
}
|
|
|
|
public function organization(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Organization::class, 'organization_id');
|
|
}
|
|
|
|
public function participants(): HasMany
|
|
{
|
|
return $this->hasMany(DirectParticipant::class, 'conversation_id');
|
|
}
|
|
|
|
public function messages(): HasMany
|
|
{
|
|
return $this->hasMany(DirectMessage::class, 'conversation_id');
|
|
}
|
|
}
|