BaseUserGroupUsers.class.php 1.87 KB
Newer Older
Игорь's avatar
init    
Игорь committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?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'));
    }
}