<?php

namespace App\Models;

/**
 * @property int $id
 * @property string $member_id
 * @property string $username
 * @property string $first_name
 * @property string $language
 */
class User extends BaseModel
{


    protected $table = 'users';
    protected $fillable = ['usdt', 'member_id', 'first_name', 'game_id', 'username', 'secret_key', 'secret_pass', 'language'];
    protected $attributes = [
        'language' => 'zh',
    ];

    public function wallet()
    {
        return $this->belongsTo(Wallet::class, 'id', 'user_id');
    }


    public function setLanguage($language): void
    {
        $this->language = $language;
    }

    public function getMemberId()
    {
        return $this->member_id;
    }

    public function getUsername()
    {
        return $this->username;
    }

    public function getFirstName()
    {
        return $this->first_name;
    }
}
