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


/**
 * staff Class
 *
 * @package     edusol
 * @subpackage  country
 * @author      Atif Razzaq
 * @link        http://atifrazzaq.arteck.xyz
 */

class kit_item_model extends CI_Model {

    public function __construct()
    {
        parent::__construct();
        $this->load->database();
    }

	
      // for saving data in sql
    public function save($data)
	{
            
            $fields_kit = array(

                            'kit_name' =>  $data['kit'],
                );
              
             return $this->db->insert('kit',$fields_kit);
             
	}

    public function edit($id)
    {
           
            $this->db->where('id',$id);
     return $this->db->get('kit')->result();


    }
      // for updating data
    public function update($data)
    {
           $id=$data['id'];
            $fields_kit = array(
                                      'kit_name' =>  $data['kit'],
                );
              
                    $this->db->where('id',$id);
             return $this->db->update('kit',$fields_kit);
                 
    }
    // for deleting ->update recourd 0 to 1
   public function delete($id){

                $fields_kit=array('is_delete'=>'1');
                $this->db->where('id',$id);
                return $this->db->update('kit',$fields_kit);
   }
    

}

