40 lines
695 B
PHP
40 lines
695 B
PHP
<?php
|
|
|
|
namespace Modules\Maintenance\Models;
|
|
|
|
use App\Business;
|
|
use App\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ActivityLog extends Model
|
|
{
|
|
protected $table = 'maintenance_activity_logs';
|
|
|
|
protected $fillable = [
|
|
'business_id',
|
|
'user_id',
|
|
'action',
|
|
'entity_type',
|
|
'entity_id',
|
|
'description',
|
|
'properties',
|
|
];
|
|
|
|
protected $casts = [
|
|
'properties' => 'array',
|
|
];
|
|
|
|
protected static function booted(): void
|
|
{ }
|
|
|
|
public function business()
|
|
{
|
|
return $this->belongsTo(Business::class);
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|