<?php 
namespace App\Models;

use App\Models\BaseModel;

class NetworkSettingsModel extends BaseModel
{
    protected $table      = 'tbl_network_settings';
    protected $primaryKey = 'network_setting_id';

    protected $returnType     = 'array';
    protected $useSoftDeletes = false;

    protected $allowedFields = [
        'device_mode', 'mode_settings', 'mode_settings_status', 'eth1_mode', 'eth1_ip_address', 'eth1_subnet_mask', 'eth1_default_gateway', 'eth2_mode', 'eth2_mode', 'eth2_subnet_mask', 'eth2_default_gateway',
        'updated_by', 'updated_at'
    ];

    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';
   
    protected $validationRules    = [];
    protected $validationMessages = [];
    protected $skipValidation     = false;

    const DEVICE_MODE_CONVERTER = 0;
    const DEVICE_MODE_GATEWAY   = 1;
    
    const MODE_SETTING_RSTP = 1;
    const MODE_SETTING_STP  = 2;

    const MODE_SETTING_STATUS_ENABLED  = 1;
    const MODE_SETTING_STATUS_DISABLED = 0;
    
}