<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Traits\GlobalModelEvents;

class Transaction extends Model
{
    use HasFactory, GlobalModelEvents;

    protected $fillable = [
        'user_id', 'type', 'amount', 'status', 'notes',
    ];

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