2006-07-24 01:08:06 +04:00
|
|
|
<?php
|
|
|
|
class Task extends Doctrine_Record {
|
|
|
|
public function setUp() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->hasOne('Task as Parent','Task.parent_id');
|
|
|
|
$this->hasMany('Task as Subtask','Subtask.parent_id');
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
public function setTableDefinition() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->hasColumn('name','string',100);
|
|
|
|
$this->hasColumn('parent_id','integer');
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|