2006-07-24 01:08:06 +04:00
|
|
|
<?php
|
|
|
|
class User extends Doctrine_Record {
|
|
|
|
public function setUp() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->ownsMany('Phonenumber','Phonenumber.user_id');
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
public function setTableDefition() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->hasColumn('name','string',50);
|
|
|
|
$this->hasColumn('loginname','string',20);
|
|
|
|
$this->hasColumn('password','string',16);
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
class Phonenumber extends Doctrine_Record {
|
|
|
|
public function setTableDefinition() {
|
2007-04-12 00:13:39 +04:00
|
|
|
$this->hasColumn('phonenumber','string',50);
|
|
|
|
$this->hasColumn('user_id','integer');
|
2006-07-24 01:08:06 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|