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

namespace App\Models\AbstractModels;

abstract class AbstractFornitore extends \Illuminate\Foundation\Auth\User
{
    /**  
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'fornitore';
    
    /**  
     * 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',  
        'attivita_id' => 'integer',
        'nome' => 'string',
        'email' => 'string',
        'telefono' => 'string',
        'indirizzo' => 'string',
        'citta' => 'string',
        'provincia' => 'string',
        'cap' => 'string',
        'paese' => 'string',
        'created_at' => 'datetime',
        'updated_at' => 'datetime'
    ];
    
    /**  
     * The attributes that are mass assignable.
     * 
     * @var array
     */
    protected $fillable = [
        'id',
        'attivita_id',
        'nome',
        'email',
        'telefono',
        'indirizzo',
        'citta',
        'provincia',
        'cap',
        'paese',
        'created_at',
        'updated_at'
    ];
    
    public function prima_nota()
    {
        return $this->hasMany('\App\Models\PrimaNota', 'fornitore_id', 'id');
    }
    
}
