<?php

/**
 * Model growth_credit
 * @author Candison November <www.kandisheng.com>
 * @time   2017-02-27
 */

class growth_credit extends MY_Model {
    private $table = 'growth_credit';

    public function __construct() {
        parent::__construct(0, 1, 0);
    }
	
	public function findByBrokerID($brokerID) {
		$result = $this->dbback
			->select('*')
            ->from($this->table)
            ->where('broker_id', $brokerID)
			->get();
		return $result ? $result->result_array() : null;
	}

	public function insertByBrokerID($brokerID) {
		$data = array();
		$data['broker_id'] = $brokerID;
		$result = $this->dbback->insert($this->table, $data);
		return $result;
	}
}