36 lines
698 B
PHP
36 lines
698 B
PHP
<?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
|
|
{
|
|
use HasFactory, Selector, SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'title',
|
|
'file_id',
|
|
'customer_id',
|
|
'product_id',
|
|
];
|
|
|
|
public function wallet()
|
|
{
|
|
return $this->hasMany(Wallet::class);
|
|
}
|
|
|
|
public function product()
|
|
{
|
|
return $this->belongsTo(Product::class, 'product_id');
|
|
}
|
|
|
|
public function customer()
|
|
{
|
|
return $this->belongsTo(Customer::class, 'customer_id');
|
|
}
|
|
}
|