1 : <?php
2 :
3 0 : Doctrine_Manager::getInstance()->bindComponent('PromoRegistered', 'doctrine');
4 :
5 :
6 :
7 :
8 :
9 :
10 :
11 :
12 :
13 :
14 :
15 :
16 :
17 :
18 :
19 :
20 :
21 : abstract class BasePromoRegistered extends Doctrine_Record
22 0 : {
23 : public function setTableDefinition()
24 : {
25 0 : $this->setTableName('promo_registered');
26 0 : $this->hasColumn('registered_id', 'integer', 4, array(
27 0 : 'type' => 'integer',
28 0 : 'fixed' => 0,
29 0 : 'unsigned' => true,
30 0 : 'primary' => true,
31 0 : 'autoincrement' => false,
32 0 : 'length' => '4',
33 0 : ));
34 0 : $this->hasColumn('promo_id', 'integer', 4, array(
35 0 : 'type' => 'integer',
36 0 : 'fixed' => 0,
37 0 : 'unsigned' => true,
38 0 : 'primary' => true,
39 0 : 'autoincrement' => false,
40 0 : 'length' => '4',
41 0 : ));
42 0 : $this->hasColumn('last_update', 'timestamp', 25, array(
43 0 : 'type' => 'timestamp',
44 0 : 'fixed' => 0,
45 0 : 'unsigned' => false,
46 0 : 'primary' => false,
47 0 : 'default' => '0000-00-00 00:00:00',
48 0 : 'notnull' => true,
49 0 : 'autoincrement' => false,
50 0 : 'length' => '25',
51 0 : ));
52 0 : }
53 :
54 : public function setUp()
55 : {
56 0 : parent::setUp();
57 0 : $this->hasOne('Registered', array(
58 0 : 'local' => 'registered_id',
59 0 : 'foreign' => 'id'));
60 :
61 0 : $this->hasOne('PromoCodes', array(
62 0 : 'local' => 'promo_id',
63 0 : 'foreign' => 'id'));
64 0 : }
|