<?php

/**
 * BaseMembershipType
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $membershipTypeCode
 * @property string $membershipTypeName
 * @property Doctrine_Collection $EmployeeMemberDetail
 * @property Doctrine_Collection $Membership
 * 
 * @method string              getMembershipTypeCode()   Returns the current record's "membershipTypeCode" value
 * @method string              getMembershipTypeName()   Returns the current record's "membershipTypeName" value
 * @method Doctrine_Collection getEmployeeMemberDetail() Returns the current record's "EmployeeMemberDetail" collection
 * @method Doctrine_Collection getMembership()           Returns the current record's "Membership" collection
 * @method MembershipType      setMembershipTypeCode()   Sets the current record's "membershipTypeCode" value
 * @method MembershipType      setMembershipTypeName()   Sets the current record's "membershipTypeName" value
 * @method MembershipType      setEmployeeMemberDetail() Sets the current record's "EmployeeMemberDetail" collection
 * @method MembershipType      setMembership()           Sets the current record's "Membership" collection
 * 
 * @package    orangehrm
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseMembershipType extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('hs_hr_membership_type');
        $this->hasColumn('membtype_code as membershipTypeCode', 'string', 13, array(
             'type' => 'string',
             'primary' => true,
             'length' => 13,
             ));
        $this->hasColumn('membtype_name as membershipTypeName', 'string', 150, array(
             'type' => 'string',
             'length' => 150,
             ));
    }

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

        $this->hasMany('Membership', array(
             'local' => 'membershipTypeCode',
             'foreign' => 'membershipTypeCode'));
    }
}