<?php

class verifyModel extends baseModel {
    
    public $tableName = 'phone_numbers';
    
	function get($id = 0)
	{
		if (!is_numeric($id)) {
			return -1;
		}
		$this->db->where('id = ?', $id);
		$phone_number = $this->db->select('phone_numbers')[0];

		return $phone_number;
	}

	function getList()
	{
		$org_id = $_SESSION['user']['id'];

		$this->db->where('org_id=?', $org_id);
		$phone_numbers = $this->db->select('phone_numbers');

		return $phone_numbers;
	}

	function insert($data)
	{
		$this->db->insert('phone_numbers', $data);

		return $this->db->insert_id();
	}

	function delete()
	{
		$org_id = $_SESSION['user']['id'];

		$this->db->where('org_id=?', $org_id);
		$this->db->delete('phone_numbers');
	}    
    
}