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

namespace App\Models\AbstractModels;

abstract class AbstractRigaOrdineHasVariante extends \Illuminate\Foundation\Auth\User
{
    /**  
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'riga_ordine_has_variante';
    
    /**  
     * 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',
        'riga_ordine_id' => 'integer',
        'variante_id' => 'integer',
        'nota' => 'string',
        'created_at' => 'datetime',
        'updated_at' => 'datetime'
    ];

    /**  
     * The attributes that are mass assignable.
     * 
     * @var array
     */
    protected $fillable = [
        'id',
        'riga_ordine_id',
        'variante_id',
        'nota',
        'created_at',
        'updated_at'
    ];
    
    public function riga_ordine()
    {
        return $this->belongsTo('\App\Models\RigaOrdine', 'riga_ordine_id', 'id');
    }

    public function variante_piatto()
    {
        return $this->belongsTo('\App\Models\VariantePiatto', 'variante_id', 'id');
    }
}
