1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | <?php // // Open Web Analytics - An Open Source Web Analytics Framework // // Copyright 2006 Peter Adams. All rights reserved. // // Licensed under GPL v2.0 http://www.gnu.org/copyleft/gpl.html // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // $Id$ // /** * Click Request Entity * * @author Peter Adams <peter@openwebanalytics.com> * @copyright Copyright © 2006 Peter Adams <peter@openwebanalytics.com> * @license http://www.gnu.org/copyleft/gpl.html GPL v2.0 * @category owa * @package owa * @version $Revision$ * @since owa 1.0.0 */ class owa_click extends owa_entity { function __construct() { $this->setTableName('click'); $this->properties['id'] = new owa_dbColumn; $this->properties['id']->setDataType(OWA_DTD_BIGINT); $this->properties['id']->setPrimaryKey(); $this->properties['last_impression_id'] = new owa_dbColumn; $this->properties['last_impression_id']->setDataType(OWA_DTD_BIGINT); $visitor_id = new owa_dbColumn('visitor_id', OWA_DTD_BIGINT); $visitor_id->setForeignKey('base.visitor'); $this->setProperty($visitor_id); $session_id = new owa_dbColumn('session_id', OWA_DTD_BIGINT); $session_id->setForeignKey('base.session'); $this->setProperty($session_id); $document_id = new owa_dbColumn('document_id', OWA_DTD_BIGINT); $document_id->setForeignKey('base.document'); $this->setProperty($document_id); $this->properties['target_id'] = new owa_dbColumn; $this->properties['target_id']->setDataType(OWA_DTD_BIGINT); $this->properties['target_url'] = new owa_dbColumn; $this->properties['target_url']->setDataType(OWA_DTD_BIGINT); $this->properties['timestamp'] = new owa_dbColumn; $this->properties['timestamp']->setDataType(OWA_DTD_INT); $this->properties['year'] = new owa_dbColumn; $this->properties['year']->setDataType(OWA_DTD_INT); $this->properties['month'] = new owa_dbColumn; $this->properties['month']->setDataType(OWA_DTD_INT); $this->properties['day'] = new owa_dbColumn; $this->properties['day']->setDataType(OWA_DTD_INT); $this->properties['dayofyear'] = new owa_dbColumn; $this->properties['dayofyear']->setDataType(OWA_DTD_INT); $this->properties['weekofyear'] = new owa_dbColumn; $this->properties['weekofyear']->setDataType(OWA_DTD_INT); $this->properties['hour'] = new owa_dbColumn; $this->properties['hour']->setDataType(OWA_DTD_TINYINT2); $this->properties['minute'] = new owa_dbColumn; $this->properties['minute']->setDataType(OWA_DTD_TINYINT2); $this->properties['second'] = new owa_dbColumn; $this->properties['second']->setDataType(OWA_DTD_INT); $this->properties['msec'] = new owa_dbColumn; $this->properties['msec']->setDataType(OWA_DTD_VARCHAR255); $this->properties['click_x'] = new owa_dbColumn; $this->properties['click_x']->setDataType(OWA_DTD_INT); $this->properties['click_y'] = new owa_dbColumn; $this->properties['click_y']->setDataType(OWA_DTD_INT); $this->properties['page_width'] = new owa_dbColumn; $this->properties['page_width']->setDataType(OWA_DTD_INT); $this->properties['page_height'] = new owa_dbColumn; $this->properties['page_height']->setDataType(OWA_DTD_INT); $this->properties['position'] = new owa_dbColumn; $this->properties['position']->setDataType(OWA_DTD_INT); $this->properties['approx_position'] = new owa_dbColumn; $this->properties['approx_position']->setDataType(OWA_DTD_BIGINT); $this->properties['dom_element_x'] = new owa_dbColumn; $this->properties['dom_element_x']->setDataType(OWA_DTD_INT); $this->properties['dom_element_y'] = new owa_dbColumn; $this->properties['dom_element_y']->setDataType(OWA_DTD_INT); $this->properties['dom_element_name'] = new owa_dbColumn; $this->properties['dom_element_name']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_id'] = new owa_dbColumn; $this->properties['dom_element_id']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_value'] = new owa_dbColumn; $this->properties['dom_element_value']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_tag'] = new owa_dbColumn; $this->properties['dom_element_tag']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_text'] = new owa_dbColumn; $this->properties['dom_element_text']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_class'] = new owa_dbColumn; $this->properties['dom_element_class']->setDataType(OWA_DTD_VARCHAR255); $this->properties['dom_element_parent_id'] = new owa_dbColumn; $this->properties['dom_element_parent_id']->setDataType(OWA_DTD_VARCHAR255); $this->properties['tag_id'] = new owa_dbColumn; $this->properties['tag_id']->setDataType(OWA_DTD_BIGINT); $this->properties['placement_id'] = new owa_dbColumn; $this->properties['placement_id']->setDataType(OWA_DTD_BIGINT); $this->properties['campaign_id'] = new owa_dbColumn; $this->properties['campaign_id']->setDataType(OWA_DTD_BIGINT); $this->properties['ad_group_id'] = new owa_dbColumn; $this->properties['ad_group_id']->setDataType(OWA_DTD_BIGINT); $this->properties['ad_id'] = new owa_dbColumn; $this->properties['ad_id']->setDataType(OWA_DTD_BIGINT); $site_id = new owa_dbColumn('site_id', OWA_DTD_VARCHAR255); $site_id->setForeignKey('base.site', 'site_id'); $this->setProperty($site_id); $ua_id = new owa_dbColumn('ua_id', OWA_DTD_BIGINT); $ua_id->setForeignKey('base.ua'); $this->setProperty($ua_id); $this->properties['ip_address'] = new owa_dbColumn; $this->properties['ip_address']->setDataType(OWA_DTD_VARCHAR255); $this->properties['host'] = new owa_dbColumn; $this->properties['host']->setDataType(OWA_DTD_VARCHAR255); //wrong data type $host_id = new owa_dbColumn('host_id', OWA_DTD_VARCHAR255); $host_id->setForeignKey('base.host'); $this->setProperty($host_id); $yyyymmdd = new owa_dbColumn; $yyyymmdd->setName('yyyymmdd'); $yyyymmdd->setDataType(OWA_DTD_INT); $yyyymmdd->setIndex(); $this->setProperty($yyyymmdd); } } ?> |