<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TripHistory extends Model
{
    protected $fillable = [
        'trip_id',
        'user_id',
        'action',
        'changes',
    ];

    protected $casts = [
        'changes' => 'array',
    ];

    public function trip()
    {
        return $this->belongsTo(Trip::class);
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }
}

