BTCoinmt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

40 lines
798 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class TransferRecord extends Model
{
//划转记录
protected $primaryKey = 'id';
protected $table = 'user_transfer_record';
protected $guarded = [];
protected $casts = [
'amount' => 'real',
];
public static $statusMap = [
1 => '划转成功',
2 => '划转失败',
];
public static $accountMap = [
'UserWallet' => '账户资产',
'ContractAccount' => '合约账户',
'OtcAccount' => '法币账户',
];
public function user()
{
return $this->belongsTo(User::class, 'user_id', 'user_id');
}
public function coin()
{
return $this->belongsTo(Coins::class, 'coin_name', 'coin_name');
}
}