feat: 项目基础框架+配置+Kernel
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UserCashInfoInternational extends Model
|
||||
{
|
||||
protected $table = 'user_cash_info_international';
|
||||
public $timestamps = false;
|
||||
protected $appends = ['account_number'];
|
||||
|
||||
|
||||
|
||||
public function getAccountNumberAttribute()
|
||||
{
|
||||
return $this->hasOne('App\Users', 'id', 'user_id')->value('account_number');
|
||||
}
|
||||
|
||||
/*
|
||||
public function setWechatNicknameAttribute($value)
|
||||
{
|
||||
$this->attributes['wechat_nickname'] = base64_encode($value);
|
||||
}
|
||||
*/
|
||||
|
||||
public function getCreateTimeAttribute()
|
||||
{
|
||||
return date('Y-m-d H:i:s', $this->attributes['create_time']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user