<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{
    use HasFactory, Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */

    public $timestamps =false;
    protected $rememberTokenName = false;

    protected $fillable = [
        'name',
        'lastname',
        'email',
        'country',
        'address',
        'city',
        'state',
        'post_code',
        'phone_number',
        'company',
        'google2fa_secret',
        'googlef2_status',
        'google_date',
        'password',
        'otp',
        'ip_address',
        'register_year',
        'register_month',
        'register_day',
        'support_pin',
        'api_token',
        'seo_status',
        'sms_status',
        'suspend',
    ];

    protected $hidden = [
        'password'
    ];

    public function history(){
        return $this->hasMany(LoginHistory::class);
    }

    public function getAuthPasswordName()
    {
        return 'password';
    }

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */


    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */

}
