|
|
@@ -13,6 +13,9 @@ use Illuminate\Database\Eloquent\Builder;
|
|
|
/**
|
|
|
* @mixin Builder
|
|
|
* @method static Builder|static where($column, $operator = null, $value = null, $boolean = 'and')
|
|
|
+ * @property mixed $member_id
|
|
|
+ * @property mixed $username
|
|
|
+ * @property mixed $first_name
|
|
|
*/
|
|
|
class User extends Authenticatable
|
|
|
{
|
|
|
@@ -20,13 +23,28 @@ class User extends Authenticatable
|
|
|
|
|
|
protected $table = 'users';
|
|
|
protected $hidden = ['created_at', 'updated_at'];
|
|
|
- protected $fillable = ['usdt', 'member_id', 'first_name', 'game_id', 'username'];
|
|
|
+ protected $fillable = ['usdt', 'member_id', 'first_name', 'game_id', 'username', 'secret_key', 'secret_pass'];
|
|
|
|
|
|
public function wallet()
|
|
|
{
|
|
|
return $this->belongsTo(Wallet::class, 'id', 'user_id');
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public function getMemberId()
|
|
|
+ {
|
|
|
+ return $this->member_id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getUsername()
|
|
|
+ {
|
|
|
+ return $this->username;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getFirstName(){
|
|
|
+ return $this->first_name;
|
|
|
+ }
|
|
|
+
|
|
|
protected function getCreatedAtAttribute($value)
|
|
|
{
|
|
|
return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
|