<?php
/**
 * Model object generated by: Skipper (http://www.skipper18.com)
 * Do not modify this file manually.
 */

namespace App\Models\AbstractModels;

abstract class AbstractUser extends \Illuminate\Foundation\Auth\User
{
    /**  
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'users';
    
    /**  
     * Primary key type.
     * 
     * @var string
     */
    protected $keyType = 'bigInteger';
    
    /**  
     * The model's default values for attributes.
     * 
     * @var array
     */
    // protected $attributes = ['is_gruppo' => 0];
    
    /**  
     * The attributes that should be cast to native types.
     * 
     * @var array
     */
    protected $casts = [
        'id' => 'integer',
        'nome' => 'string',
        'cognome' => 'string',
        'email' => 'string',
        'telefono' => 'string',
        'password' => 'string',
        'email_verified_at' => 'datetime',
        'remember_token' => 'string',
        'api_token' => 'string',
        'two_factor_secret' => 'string',
        'two_factor_recovery_codes' => 'string',
        'two_factor_confirmed_at' => 'datetime',
        // 'is_gruppo' => 'boolean',
        // 'label_gruppo' => 'string',
        // 'componenti_gruppo' => 'array',
        // 'azienda' => 'string',
        'created_at' => 'datetime',
        'updated_at' => 'datetime'
    ];
    
    /**  
     * The attributes that are mass assignable.
     * 
     * @var array
     */
    protected $fillable = [
        'id',
        'nome',
        'cognome',
        'email',
        'telefono',
        'password',
        'email_verified_at',
        'remember_token',
        'api_token',
        'two_factor_secret',
        'two_factor_recovery_codes',
        'two_factor_confirmed_at',
        // 'is_gruppo',
        // 'label_gruppo',
        // 'componenti_gruppo',
        // 'azienda',
        'created_at',
        'updated_at'
    ];
    
    public function attivita()
    {
        return $this->hasMany('\App\Models\Attivita', 'user_id', 'id');
    }
    
}
