32 lines
569 B
PHP
32 lines
569 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class AffiliatorWithdraw extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'affiliator_withdraws';
|
|
|
|
protected $fillable = [
|
|
'affiliator_id',
|
|
'amount',
|
|
'status',
|
|
'time',
|
|
];
|
|
|
|
public function affiliator()
|
|
{
|
|
return $this->belongsTo(Affiliator::class);
|
|
}
|
|
|
|
|
|
public function feeLedger()
|
|
{
|
|
return $this->morphOne(AffiliatorFeeLedger::class, 'transaction');
|
|
}
|
|
}
|