<?php

/**
 * BaseSuppliers
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property text $org
 * @property string $fio
 * @property string $email
 * @property string $phone
 * @property Doctrine_Collection $Product
 * 
 * @method text                getOrg()     Returns the current record's "org" value
 * @method string              getFio()     Returns the current record's "fio" value
 * @method string              getEmail()   Returns the current record's "email" value
 * @method string              getPhone()   Returns the current record's "phone" value
 * @method Doctrine_Collection getProduct() Returns the current record's "Product" collection
 * @method Suppliers           setOrg()     Sets the current record's "org" value
 * @method Suppliers           setFio()     Sets the current record's "fio" value
 * @method Suppliers           setEmail()   Sets the current record's "email" value
 * @method Suppliers           setPhone()   Sets the current record's "phone" value
 * @method Suppliers           setProduct() Sets the current record's "Product" collection
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseSuppliers extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('suppliers');
        $this->hasColumn('org', 'text', null, array(
             'type' => 'text',
             'notnull' => true,
             ));
        $this->hasColumn('fio', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
        $this->hasColumn('email', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
        $this->hasColumn('phone', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
    }

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

        $timestampable0 = new Doctrine_Template_Timestampable();
        $this->actAs($timestampable0);
    }
}