<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BillModification extends Model
{
    protected $fillable = [
        'order_id',
        'user_id',
        'modification_type',
        'old_value',
        'new_value',
        'notes',
    ];

    protected $casts = [
        'old_value' => 'array',
        'new_value' => 'array',
    ];

    public function order()
    {
        return $this->belongsTo(Order::class);
    }

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