1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/models/MyUserGroup.php

19 lines
559 B
PHP

<?php
class MyUserGroup extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('my_user_group');
$this->hasColumn('id', 'integer', 4, array ( 'primary' => true, 'autoincrement' => true,));
$this->hasColumn('group_id', 'integer', 4, array ());
$this->hasColumn('user_id', 'integer', 4, array ());
}
public function setUp()
{
$this->hasOne('MyGroup as MyGroup', 'MyUserGroup.group_id');
$this->hasOne('MyUser as MyUser', 'MyUserGroup.user_id');
}
}