<?php
	defined('BASEPATH') OR exit('No direct script access allowed');

	class Hc_logs_model extends My_Model{
		protected $_table_name = 'hc_admin_logs';
		protected $_order_by = 'id';

		public function __construct(){
			parent::__construct();
		}

		public function add_log($data){
			if(!empty($data)){

				$insert_data["action_type"] = isset($data["action_type"]) ? $data["action_type"] : "";
				$insert_data["action_identifier"] = isset($data["action_identifier"]) ? $data["action_identifier"] : "";
				$insert_data["request"] = isset($data["request"]) ? $data["request"] : "";
				$insert_data["response"] = isset($data["response"]) ? $data["response"] : "";

				//$log_id = $this->save_logs($insert_data);

				return 0;
			}

			return 0;
		}


		public function save_logs($data){

			$this->load->model("hc_logs_model", "logs");

			$data["created_by"] = isset($_SESSION["id"]) ? $_SESSION["id"] : 0;
			$data["created_at"] = Date("Y-m-d H:i:s");

			//$log_id = $this->logs->save($data, NULL);

			return 0;
		}

	}
?>