Example #1
0
 /** constructor */
 public function __construct()
 {
     parent::__construct();
     $this->_name = 'statistics_download';
     $this->_key = 'download_id';
     $this->_mainData = array('download_id' => array('type' => MIDAS_DATA), 'item_id' => array('type' => MIDAS_DATA), 'user_id' => array('type' => MIDAS_DATA), 'ip_location_id' => array('type' => MIDAS_DATA), 'date' => array('type' => MIDAS_DATA), 'user_agent' => array('type' => MIDAS_DATA), 'item' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'Item', 'parent_column' => 'item_id', 'child_column' => 'item_id'), 'user' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'User', 'parent_column' => 'user_id', 'child_column' => 'user_id'), 'ip_location' => array('type' => MIDAS_MANY_TO_ONE, 'model' => 'IpLocation', 'module' => 'statistics', 'parent_column' => 'ip_location_id', 'child_column' => 'ip_location_id'));
     $this->initialize();
     // required
 }
 /** constructor */
 public function __construct()
 {
     parent::__construct();
     $this->_name = 'statistics_ip_location';
     $this->_key = 'ip_location_id';
     $this->_daoName = 'IpLocationDao';
     $this->_mainData = array('ip_location_id' => array('type' => MIDAS_DATA), 'ip' => array('type' => MIDAS_DATA), 'latitude' => array('type' => MIDAS_DATA), 'longitude' => array('type' => MIDAS_DATA), 'downloads' => array('type' => MIDAS_ONE_TO_MANY, 'model' => 'Download', 'module' => 'statistics', 'parent_column' => 'ip_location_id', 'child_column' => 'ip_location_id'));
     $this->initialize();
     // required
 }