<?php

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

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

        $this->hasMany('EmployeeMemberDetail', array(
             'local' => 'membershipCode',
             'foreign' => 'membershipCode'));
    }
}