<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Funding extends Model
{
    use HasFactory;

    protected $fillable = [
        'chat_id',
        'amount',
        'coin',
        'status'
    ];

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

    public function advertiser(){
        return $this->belongsTo(WalletAddress::class, 'wallet_address_id');
    }

    public function chat()
    {
        return $this->belongsTo(FundingChat::class);
    }
}
