<?php 
namespace App\Models;

use App\Models\BaseModel;

class SlaveDevicesModel extends BaseModel
{
    protected $table      = 'tbl_slave_devices';
    protected $primaryKey = 'slave_device_id';

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

    protected $allowedFields = [
        'slave_id', 'register_address', 'function_code', 'no_of_registers', 'slave_read', 'request_interval', 'slave_data_type', 'updated_by', 'updated_at'
    ];

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

    const DEFAULT_SLAVE_ID         = 1;
    const DEFAULT_REQUEST_INTERVAL = 10;
    const DEFAULT_DATA_TYPE        = 'INT';


    public static $s_arrstrDataTypes = [ 
        'INT'    => 'INT',
        'SHORT'  => 'SHORT',
        'FLOAT'  => 'FLOAT', 
        'DOUBLE' => 'DOUBLE' 
    ];
    
}