root/tags/0.10.0/models/App.php
| Revision 2353, 411 bytes (checked in by meus, 16 months ago) |
|---|
| Line | |
|---|---|
| 1 | <?php |
| 2 | class App extends Doctrine_Record { |
| 3 | public function setTableDefinition() { |
| 4 | $this->hasColumn('name', 'string', 32); |
| 5 | $this->hasColumn('user_id', 'integer', 11); |
| 6 | $this->hasColumn('app_category_id', 'integer', 11); |
| 7 | } |
| 8 | public function setUp() { |
| 9 | $this->hasOne('User', 'User.id'); |
| 10 | $this->hasMany('App_Category as Category', 'App_Category.id'); |
| 11 | } |
| 12 | } |
Note: See TracBrowser
for help on using the browser.