<?php

/**
 * BaseLocation
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $loc_code
 * @property string $loc_name
 * @property string $loc_country
 * @property string $loc_state
 * @property string $loc_city
 * @property string $loc_add
 * @property string $loc_zip
 * @property string $loc_phone
 * @property string $loc_fax
 * @property string $loc_comments
 * @property Doctrine_Collection $CompanyStructure
 * @property Doctrine_Collection $Employees
 * 
 * @method string              getLocCode()          Returns the current record's "loc_code" value
 * @method string              getLocName()          Returns the current record's "loc_name" value
 * @method string              getLocCountry()       Returns the current record's "loc_country" value
 * @method string              getLocState()         Returns the current record's "loc_state" value
 * @method string              getLocCity()          Returns the current record's "loc_city" value
 * @method string              getLocAdd()           Returns the current record's "loc_add" value
 * @method string              getLocZip()           Returns the current record's "loc_zip" value
 * @method string              getLocPhone()         Returns the current record's "loc_phone" value
 * @method string              getLocFax()           Returns the current record's "loc_fax" value
 * @method string              getLocComments()      Returns the current record's "loc_comments" value
 * @method Doctrine_Collection getCompanyStructure() Returns the current record's "CompanyStructure" collection
 * @method Doctrine_Collection getEmployees()        Returns the current record's "Employees" collection
 * @method Location            setLocCode()          Sets the current record's "loc_code" value
 * @method Location            setLocName()          Sets the current record's "loc_name" value
 * @method Location            setLocCountry()       Sets the current record's "loc_country" value
 * @method Location            setLocState()         Sets the current record's "loc_state" value
 * @method Location            setLocCity()          Sets the current record's "loc_city" value
 * @method Location            setLocAdd()           Sets the current record's "loc_add" value
 * @method Location            setLocZip()           Sets the current record's "loc_zip" value
 * @method Location            setLocPhone()         Sets the current record's "loc_phone" value
 * @method Location            setLocFax()           Sets the current record's "loc_fax" value
 * @method Location            setLocComments()      Sets the current record's "loc_comments" value
 * @method Location            setCompanyStructure() Sets the current record's "CompanyStructure" collection
 * @method Location            setEmployees()        Sets the current record's "Employees" collection
 * 
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseLocation extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('hs_hr_location');
        $this->hasColumn('loc_code', 'string', 13, array(
             'type' => 'string',
             'primary' => true,
             'length' => 13,
             ));
        $this->hasColumn('loc_name', 'string', 100, array(
             'type' => 'string',
             'length' => 100,
             ));
        $this->hasColumn('loc_country', 'string', 3, array(
             'type' => 'string',
             'length' => 3,
             ));
        $this->hasColumn('loc_state', 'string', 50, array(
             'type' => 'string',
             'length' => 50,
             ));
        $this->hasColumn('loc_city', 'string', 50, array(
             'type' => 'string',
             'length' => 50,
             ));
        $this->hasColumn('loc_add', 'string', 100, array(
             'type' => 'string',
             'length' => 100,
             ));
        $this->hasColumn('loc_zip', 'string', 10, array(
             'type' => 'string',
             'length' => 10,
             ));
        $this->hasColumn('loc_phone', 'string', 30, array(
             'type' => 'string',
             'length' => 30,
             ));
        $this->hasColumn('loc_fax', 'string', 30, array(
             'type' => 'string',
             'length' => 30,
             ));
        $this->hasColumn('loc_comments', 'string', 100, array(
             'type' => 'string',
             'length' => 100,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('CompanyStructure', array(
             'local' => 'loc_code',
             'foreign' => 'loc_code'));

        $this->hasMany('Employee as Employees', array(
             'refClass' => 'EmpLocations',
             'local' => 'loc_code',
             'foreign' => 'emp_number'));
    }
}