4d8839e802
git commit "feat: implement activity logging for tours and flights"
50 lines
805 B
PHP
50 lines
805 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class ActivityLog
|
|
*
|
|
* @property int $id
|
|
* @property int|null $admin_id
|
|
* @property string $action
|
|
* @property string $model
|
|
* @property int $model_id
|
|
* @property string|null $description
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class ActivityLog extends Model
|
|
{
|
|
protected $table = 'activity_logs';
|
|
public static $snakeAttributes = false;
|
|
|
|
protected $casts = [
|
|
'admin_id' => 'int',
|
|
'model_id' => 'int'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'admin_id',
|
|
'action',
|
|
'model',
|
|
'model_id',
|
|
'description'
|
|
];
|
|
|
|
public function admin()
|
|
{
|
|
return $this->belongsTo(Admin::class);
|
|
}
|
|
|
|
}
|