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