Files
Epicnabbo-Catalogus-Updated…/Updated_Cms/app/Models/ChatlogRoom.php
T
Remco 8d3115678c 🆙 More fixes 🆙
2026-01-19 21:04:53 +01:00

44 lines
842 B
PHP

<?php
namespace App\Models;
use App\Models\Game\Room;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ChatlogRoom extends Model
{
protected $table = 'chatlogs_room';
protected $guarded = [];
public $timestamps = false;
protected $primaryKey = 'timestamp';
/**
* @return BelongsTo<Room, $this>
*/
public function room(): BelongsTo
{
return $this->belongsTo(Room::class);
}
/**
* @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');
}
}