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

namespace App\Models\AbstractModels;

abstract class AbstractListinoPrezzi extends \Illuminate\Foundation\Auth\User
{
    /**  
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'listino_prezzi';
    
    /**  
     * 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',  
        'categoria' => 'string',
        'label' => 'string',
        'descrizione' => 'string',
        'tipo_dispositivo' => 'string',
        'prezzo' => 'decimal:2',
        'tipo_prezzo' => 'string',
        'note' => 'string',
        'created_at' => 'datetime',
        'updated_at' => 'datetime'
    ];
    
    /**  
     * The attributes that are mass assignable.
     * 
     * @var array
     */
    protected $fillable = [
        'id',   
        'categoria',
        'label',
        'descrizione',
        'tipo_dispositivo',
        'prezzo',
        'tipo_prezzo',
        'note',
        'created_at',
        'updated_at'
    ];
    

    public function riga_fatturazione()
    {
        return $this->hasMany('\App\Models\RigaFatturazione', 'listino_prezzi_id');
    }

}
