main
This commit is contained in:
Executable
+63
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class TransactionsAdmin extends Model
|
||||
{
|
||||
use HasFactory,SoftDeletes,Selector;
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'order_id',
|
||||
'customer_to_id',
|
||||
'user_id',
|
||||
'wallet',
|
||||
'transaction_id',
|
||||
'cash',
|
||||
'note',
|
||||
'type',
|
||||
'gold',
|
||||
'balance_cash',
|
||||
'balance_gold',
|
||||
'withdraw_id',
|
||||
];
|
||||
// static $STS = [
|
||||
// 1=>'در انتظار تایید',
|
||||
// 2=>'تایید شده',
|
||||
// 3=>'رد شده',
|
||||
// ];
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function customerTo()
|
||||
{
|
||||
return $this->belongsTo(Customer::class, 'customer_to_id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function order()
|
||||
{
|
||||
return $this->belongsTo(Order::class);
|
||||
}
|
||||
|
||||
// public function transaction()
|
||||
// {
|
||||
// return $this->belongsTo(\Rooyesh\Wallet\Models\Transaction::class, 'transaction_id');
|
||||
// }
|
||||
|
||||
|
||||
public function withdraw()
|
||||
{
|
||||
return $this->belongsTo(Withdraw::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user