<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use App\Models\Investment;
use App\Models\Plan;
use App\Models\User;
use App\Traits\GlobalModelEvents;

class Deposit extends Model
{
    use HasFactory, Notifiable, GlobalModelEvents;
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id',
        'payment_id',
        'amount',
        'qr_code',
        'network',
        'type',
        'status',
    ];

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

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

    public function plan(){
        return $this->belongsTo(Plan::class);
    }
}
