1 : <?php
2 :
3 0 : Doctrine_Manager::getInstance()->bindComponent('Instructors', 'doctrine');
4 :
5 :
6 :
7 :
8 :
9 :
10 :
11 :
12 :
13 :
14 :
15 :
16 :
17 :
18 :
19 :
20 :
21 :
22 :
23 :
24 :
25 :
26 :
27 : abstract class BaseInstructors extends Doctrine_Record
28 0 : {
29 : public function setTableDefinition()
30 : {
31 0 : $this->setTableName('instructors');
32 0 : $this->hasColumn('id', 'integer', 4, array(
33 0 : 'type' => 'integer',
34 0 : 'fixed' => 0,
35 0 : 'unsigned' => true,
36 0 : 'primary' => true,
37 0 : 'autoincrement' => true,
38 0 : 'length' => '4',
39 0 : ));
40 0 : $this->hasColumn('ident', 'string', 45, array(
41 0 : 'type' => 'string',
42 0 : 'fixed' => 0,
43 0 : 'unsigned' => false,
44 0 : 'primary' => false,
45 0 : 'notnull' => true,
46 0 : 'autoincrement' => false,
47 0 : 'length' => '45',
48 0 : ));
49 0 : $this->hasColumn('first_name', 'string', 100, array(
50 0 : 'type' => 'string',
51 0 : 'fixed' => 0,
52 0 : 'unsigned' => false,
53 0 : 'primary' => false,
54 0 : 'notnull' => false,
55 0 : 'autoincrement' => false,
56 0 : 'length' => '100',
57 0 : ));
58 0 : $this->hasColumn('middle_name', 'string', 100, array(
59 0 : 'type' => 'string',
60 0 : 'fixed' => 0,
61 0 : 'unsigned' => false,
62 0 : 'primary' => false,
63 0 : 'notnull' => false,
64 0 : 'autoincrement' => false,
65 0 : 'length' => '100',
66 0 : ));
67 0 : $this->hasColumn('last_name', 'string', 100, array(
68 0 : 'type' => 'string',
69 0 : 'fixed' => 0,
70 0 : 'unsigned' => false,
71 0 : 'primary' => false,
72 0 : 'notnull' => false,
73 0 : 'autoincrement' => false,
74 0 : 'length' => '100',
75 0 : ));
76 0 : $this->hasColumn('summery', 'string', null, array(
77 0 : 'type' => 'string',
78 0 : 'fixed' => 0,
79 0 : 'unsigned' => false,
80 0 : 'primary' => false,
81 0 : 'notnull' => true,
82 0 : 'autoincrement' => false,
83 0 : 'length' => '',
84 0 : ));
85 0 : $this->hasColumn('medium', 'string', 45, array(
86 0 : 'type' => 'string',
87 0 : 'fixed' => 0,
88 0 : 'unsigned' => false,
89 0 : 'primary' => false,
90 0 : 'notnull' => true,
91 0 : 'autoincrement' => false,
92 0 : 'length' => '45',
93 0 : ));
94 0 : $this->hasColumn('desc', 'string', null, array(
95 0 : 'type' => 'string',
96 0 : 'fixed' => 0,
97 0 : 'unsigned' => false,
98 0 : 'primary' => false,
99 0 : 'notnull' => true,
100 0 : 'autoincrement' => false,
101 0 : 'length' => '',
102 0 : ));
103 0 : $this->hasColumn('date_created', 'timestamp', 25, array(
104 0 : 'type' => 'timestamp',
105 0 : 'fixed' => 0,
106 0 : 'unsigned' => false,
107 0 : 'primary' => false,
108 0 : 'notnull' => false,
109 0 : 'autoincrement' => false,
110 0 : 'length' => '25',
111 0 : ));
112 0 : $this->hasColumn('last_update', 'timestamp', 25, array(
113 0 : 'type' => 'timestamp',
114 0 : 'fixed' => 0,
115 0 : 'unsigned' => false,
116 0 : 'primary' => false,
117 0 : 'notnull' => true,
118 0 : 'autoincrement' => false,
119 0 : 'length' => '25',
120 0 : ));
121 0 : }
122 :
123 : public function setUp()
124 : {
125 0 : parent::setUp();
126 0 : $this->hasMany('Categories', array(
127 0 : 'local' => 'id',
128 0 : 'foreign' => 'instructor_id'));
129 0 : }
|