أُنشئ من Tokal/Test
32 أسطر
599 B
PHP
32 أسطر
599 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class ReservationStatusHistory extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'reservation_id',
|
|
'old_status',
|
|
'new_status',
|
|
'changed_by_user_id',
|
|
'created_at',
|
|
];
|
|
|
|
public function reservation()
|
|
{
|
|
return $this->belongsTo(Reservation::class);
|
|
}
|
|
|
|
public function changedBy()
|
|
{
|
|
return $this->belongsTo(User::class, 'changed_by_user_id');
|
|
}
|
|
}
|