<?php

/**
 * BaseUserGroupUsers
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $user_id
 * @property integer $user_group_id
 * @property User $User
 * @property UserGroup $UserGroup
 * 
 * @method integer        getUserId()        Returns the current record's "user_id" value
 * @method integer        getUserGroupId()   Returns the current record's "user_group_id" value
 * @method User           getUser()          Returns the current record's "User" value
 * @method UserGroup      getUserGroup()     Returns the current record's "UserGroup" value
 * @method UserGroupUsers setUserId()        Sets the current record's "user_id" value
 * @method UserGroupUsers setUserGroupId()   Sets the current record's "user_group_id" value
 * @method UserGroupUsers setUser()          Sets the current record's "User" value
 * @method UserGroupUsers setUserGroup()     Sets the current record's "UserGroup" value
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseUserGroupUsers extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('user_group_users');
        $this->hasColumn('user_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('user_group_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('User', array(
             'local' => 'user_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));

        $this->hasOne('UserGroup', array(
             'local' => 'user_group_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));
    }
}