36 lines
658 B
PHP
36 lines
658 B
PHP
<?php
|
|
|
|
namespace Modules\Maintenance\Models;
|
|
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class RepairDispatchEvent extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $table = 'maintenance_repair_dispatch_events';
|
|
|
|
protected $fillable = [
|
|
'repair_dispatch_id',
|
|
'status',
|
|
'notes',
|
|
'user_id',
|
|
'created_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'created_at' => 'datetime',
|
|
];
|
|
|
|
public function dispatch()
|
|
{
|
|
return $this->belongsTo(RepairDispatch::class, 'repair_dispatch_id');
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|