0
0

更新代码

This commit is contained in:
2020-08-04 10:09:42 +08:00
parent 6118b5b63b
commit c2ac5d964e
478 changed files with 34410 additions and 0 deletions

42
app/Models/Withdraw.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
namespace App\Models;
use App\User;
class Withdraw extends Model
{
public function user()
{
return $this->belongsTo(User::class);
}
protected function getStateTextAttribute()
{
if ($this->state == 0) {
return '待审核';
} else if ($this->state == -1) {
return '提现失败';
} elseif ($this->state == 1) {
return '成功';
} elseif ($this->state == 2) {
return '驳回';
}
}
protected function getTypeTextAttribute()
{
switch ($this->type) {
case 'Alipay':
return '支付宝';
break;
case 'Wechat':
return '微信零钱';
break;
default:
return '未知';
break;
}
}
}