2026-01-24 14:03:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
use Rooyesh\Wallet\models\Wallet;
|
|
|
|
|
|
|
|
|
|
class Fund extends Model
|
|
|
|
|
{
|
2026-08-01 17:30:14 +03:30
|
|
|
use HasFactory, Selector, SoftDeletes;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
2026-01-24 14:03:11 +00:00
|
|
|
'title',
|
|
|
|
|
'file_id',
|
|
|
|
|
'customer_id',
|
2026-08-01 17:30:14 +03:30
|
|
|
'product_id',
|
2026-01-24 14:03:11 +00:00
|
|
|
];
|
2026-08-01 17:30:14 +03:30
|
|
|
|
2026-01-24 14:03:11 +00:00
|
|
|
public function wallet()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(Wallet::class);
|
|
|
|
|
}
|
2026-08-01 17:30:14 +03:30
|
|
|
|
|
|
|
|
public function product()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Product::class, 'product_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function customer()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Customer::class, 'customer_id');
|
|
|
|
|
}
|
2026-01-24 14:03:11 +00:00
|
|
|
}
|