Example #1
0
 public function where($map, $parse = null)
 {
     if (!$this->not_belongs_to_company) {
         $this->real_model_name = $this->real_model_name ? $this->real_model_name : $this->getModelName();
         $map[$this->real_model_name . ".company_id"] = get_current_company_id();
     }
     return parent::where($map, $parse);
 }
 public function add($data = array())
 {
     if (!$data) {
         $data = I('post.');
     }
     if ($this->create($data)) {
         if (parent::add()) {
             return true;
         }
     }
     return false;
 }
 public function __construct($name = '', $tablePrefix = '', $connection = '')
 {
     parent::__construct($name, $tablePrefix, $connection);
 }