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

namespace App\Models\AbstractModels;

abstract class AbstractMonitorHasContenuto extends \Illuminate\Foundation\Auth\User
{
    /**  
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'monitor_has_contenuto';
    
    /**  
     * 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',  
        'monitor_id' => 'integer',
        'is_bacheca' => 'boolean',
        'cucina_id' => 'integer',
        'contenuto_bacheca_id' => 'integer',
        'bacheca_id' => 'integer',
        'created_at' => 'datetime',
        'updated_at' => 'datetime'
    ];
    
    /**  
     * The attributes that are mass assignable.
     * 
     * @var array
     */
    protected $fillable = [
        'id',
        'monitor_id',
        'is_bacheca',
        'cucina_id',
        'contenuto_bacheca_id',
        'bacheca_id',
        'created_at',
        'updated_at'
    ];
    
    public function monitor()
    {
        return $this->belongsTo('\App\Models\Dispositivo', 'monitor_id', 'id');
    }

    public function cucina()    
    {
        return $this->belongsTo('\App\Models\Cucina', 'cucina_id', 'id');
    }

    public function contenuto_bacheca()
    {
        return $this->belongsTo('\App\Models\ContenutoBacheca', 'contenuto_bacheca_id', 'id');
    }

    public function bacheca()
    {
        return $this->belongsTo('\App\Models\Bacheca', 'bacheca_id', 'id');
    }
    
}
