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>
45 lines
1.1 KiB
PHP
45 lines
1.1 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 DirectMessage extends Model
|
|
{
|
|
use BelongsToOwner;
|
|
|
|
protected $table = 'meet_direct_messages';
|
|
|
|
protected $fillable = [
|
|
'uuid', 'owner_ref', 'conversation_id', 'sender_ref', 'sender_name', 'body', 'parent_id',
|
|
];
|
|
|
|
protected static function booted(): void
|
|
{
|
|
static::creating(function (DirectMessage $message) {
|
|
if (empty($message->uuid)) {
|
|
$message->uuid = (string) Str::uuid();
|
|
}
|
|
});
|
|
}
|
|
|
|
public function conversation(): BelongsTo
|
|
{
|
|
return $this->belongsTo(DirectConversation::class, 'conversation_id');
|
|
}
|
|
|
|
public function parent(): BelongsTo
|
|
{
|
|
return $this->belongsTo(DirectMessage::class, 'parent_id');
|
|
}
|
|
|
|
public function replies(): HasMany
|
|
{
|
|
return $this->hasMany(DirectMessage::class, 'parent_id');
|
|
}
|
|
}
|