<?php
 /**
  * Model for business_partners table
  *
  * This is the model for business_partners table extended from MY_Model.
  *
  * @author Innoxess Spain, S.L. <hola@innoxess.es>
  * @copyright 2015-2018 Innoxess Spain, S.L.
  * @package  Application
  * @subpackage Models
  *
  */
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * Class Business_partners_m - Model
  *
  * Model for business_partners table.
  */
class Business_partners_m extends MY_Model
{
	 /** @var string This is the database table for this model. */
	var $table = "business_partners";

	/**
	  * Constructor
	  */
	function __construct()
	{
		parent::__construct();
	}

	/**
	  * Fetch a single record based on bp_id column. Return an array
	  *
	  * @param int $id ID
	  *
	  * @return array
	  */
	function get_by_external_id($id)
	{
		$this->primary_key	= 'bp_id';
		$results			= $this->get_one($id);
		$this->primary_key	= 'id';

		return $results;
	}
}
