<?php

/**
 * BaseUserIdentitiy
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property int             $user_id                               Type: integer, primary key
 * @property int             $provider_id                           Type: integer, primary key
 * @property string          $user_identity                         Type: string(2000)
 * @property OpenidProvider  $OpenidProvider                        
 * @property SystemUser      $SystemUser                            
 *  
 * @method int               getUserId()                            Type: integer, primary key
 * @method int               getProviderId()                        Type: integer, primary key
 * @method string            getUserIdentity()                      Type: string(2000)
 * @method OpenidProvider    getOpenidProvider()                    
 * @method SystemUser        getSystemUser()                        
 *  
 * @method UserIdentitiy     setUserId(int $val)                    Type: integer, primary key
 * @method UserIdentitiy     setProviderId(int $val)                Type: integer, primary key
 * @method UserIdentitiy     setUserIdentity(string $val)           Type: string(2000)
 * @method UserIdentitiy     setOpenidProvider(OpenidProvider $val) 
 * @method UserIdentitiy     setSystemUser(SystemUser $val)         
 *  
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseUserIdentitiy extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ohrm_openid_user_identity');
        $this->hasColumn('user_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('provider_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('user_identity', 'string', 2000, array(
             'type' => 'string',
             'length' => 2000,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('OpenidProvider', array(
             'local' => 'provider_id',
             'foreign' => 'id'));

        $this->hasOne('SystemUser', array(
             'local' => 'user_id',
             'foreign' => 'id'));
    }
}