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

namespace App\Models\AbstractModels;

use Illuminate\Database\Eloquent\Model;

abstract class AbstractConfig extends Model
{
    /**  
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'config';
    
    /**  
     * Primary key type.
     * 
     * @var string
     */
    protected $keyType = 'bigInteger';
    
    /**  
     * The attributes that should be cast to native types.
     * 
     * @var array
     */
    protected $casts = [
        'id' => 'integer',
        'azienda_id' => 'integer',
        'key' => 'string',
        'group' => 'string',
        'display_name' => 'string',
        'value' => 'string',
        'order' => 'integer',
        'type' => 'string',
        'created_at' => 'datetime',
        'updated_at' => 'datetime'
    ];
    
    /**  
     * The attributes that are mass assignable.
     * 
     * @var array
     */
    protected $fillable = [
        'id',
        'azienda_id',
        'key',
        'group',
        'display_name',
        'value',
        'order',
        'type',
        'created_at',
        'updated_at'
    ];
    
    public function azienda()
    {
        return $this->belongsTo('\App\Models\Azienda', 'azienda_id', 'id');
    }
}
