<?php

namespace App\Modules\User\Models;

use Illuminate\Database\Eloquent\Model;

class QappUser extends Model
{
    protected $table = 'qapp_users';
    protected $fillable = [
        'imei',
        'oaid',
        'androidid',
        'device_no',
        'mac',
        'uid',
        'device_info',
        'phone',
        'channel_id',
        'status',
    ];

    /**
     * @param $uid
     * @return array
     */
    public static function getUserByUid($uid)
    {
        if (empty($uid)) {
            return [];
        }

        return self::where('uid', $uid)->first();
    }
}
