You've already forked Epicnabbo-Catalogus-Updated-Daily
33 lines
629 B
PHP
33 lines
629 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ChatlogPrivate extends Model
|
|
{
|
|
protected $table = 'chatlogs_private';
|
|
|
|
protected $guarded = [];
|
|
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* @return BelongsTo<User, $this>
|
|
*/
|
|
public function sender(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'user_from_id');
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo<User, $this>
|
|
*/
|
|
public function receiver(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'user_to_id');
|
|
}
|
|
}
|