<?php

namespace App\Models;

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

class In_transaction extends Model
{
    use HasFactory, GlobalModelEvents;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id',
        'investment_id',
        'amount',
    ];

    public function investment(){
        return $this->belongsTo(Investment::class);
    }

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