2021-02-25 08:41:02 +00:00
|
|
|
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
/**
|
|
|
|
* Created by PhpStorm.
|
|
|
|
* User: capp
|
|
|
|
* Date: 29/05/2018
|
|
|
|
* Time: 15:49
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
class Nano_health_model extends CI_Model
|
|
|
|
{
|
2021-10-05 06:34:11 +00:00
|
|
|
|
|
|
|
public function createConfig($id_network){
|
2021-10-11 00:14:08 +00:00
|
|
|
$this->db->insert('nh_networks_configs', ['network_id' => $id_network]);
|
2021-10-05 06:34:11 +00:00
|
|
|
return $this->db->insert_id();
|
|
|
|
}
|
|
|
|
|
2021-10-11 00:14:08 +00:00
|
|
|
public function getConfig($id_network){
|
|
|
|
return $this->db->get_where('nh_networks_configs',['network_id'=> $id_network]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function updateConfig($configId, $data){
|
|
|
|
$this->db->where('id', $configId);
|
|
|
|
return $this->db->update('nh_networks_configs', $data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getConfigYearsPricesGrid($configId){
|
|
|
|
return $this->db->get_where('nh_years_prices_grid',['nh_network_config_id'=> $configId]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getConfigMonthsPricesGrid($configId){
|
|
|
|
return $this->db->get_where('nh_months_prices_grid',['nh_network_config_id'=> $configId]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getConfigActs($configId){
|
|
|
|
return $this->db->get_where('nh_acts',['nh_network_config_id'=> $configId]);
|
2021-10-05 06:34:11 +00:00
|
|
|
}
|
|
|
|
|
2021-10-14 14:33:02 +00:00
|
|
|
// Classes de prestataires
|
|
|
|
public function getProviderClasses($configId)
|
2021-02-25 08:41:02 +00:00
|
|
|
{
|
2021-10-14 14:33:02 +00:00
|
|
|
return $this->db->get_where('nh_provider_classes',['nh_network_config_id'=> $configId]);
|
2021-02-25 08:41:02 +00:00
|
|
|
}
|
|
|
|
}
|