<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('Organization', 'doctrine');

/**
 * BaseOrganization
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $name
 * @property string $description
 * @property string $policy
 * @property string $contactus
 * @property string $logo
 * @property string $domain
 * @property string $website
 * @property integer $type
 * @property string $out_image
 * @property float $lat
 * @property float $lng
 * @property integer $is_active
 * @property integer $is_top
 * @property Doctrine_Collection $News
 * @property Doctrine_Collection $User
 * 
 * @method integer             getId()          Returns the current record's "id" value
 * @method string              getName()        Returns the current record's "name" value
 * @method string              getDescription() Returns the current record's "description" value
 * @method string              getPolicy()      Returns the current record's "policy" value
 * @method string              getContactus()   Returns the current record's "contactus" value
 * @method string              getLogo()        Returns the current record's "logo" value
 * @method string              getDomain()      Returns the current record's "domain" value
 * @method string              getWebsite()     Returns the current record's "website" value
 * @method integer             getType()        Returns the current record's "type" value
 * @method string              getOutImage()    Returns the current record's "out_image" value
 * @method float               getLat()         Returns the current record's "lat" value
 * @method float               getLng()         Returns the current record's "lng" value
 * @method integer             getIsActive()    Returns the current record's "is_active" value
 * @method integer             getIsTop()       Returns the current record's "is_top" value
 * @method Doctrine_Collection getNews()        Returns the current record's "News" collection
 * @method Doctrine_Collection getUser()        Returns the current record's "User" collection
 * @method Organization        setId()          Sets the current record's "id" value
 * @method Organization        setName()        Sets the current record's "name" value
 * @method Organization        setDescription() Sets the current record's "description" value
 * @method Organization        setPolicy()      Sets the current record's "policy" value
 * @method Organization        setContactus()   Sets the current record's "contactus" value
 * @method Organization        setLogo()        Sets the current record's "logo" value
 * @method Organization        setDomain()      Sets the current record's "domain" value
 * @method Organization        setWebsite()     Sets the current record's "website" value
 * @method Organization        setType()        Sets the current record's "type" value
 * @method Organization        setOutImage()    Sets the current record's "out_image" value
 * @method Organization        setLat()         Sets the current record's "lat" value
 * @method Organization        setLng()         Sets the current record's "lng" value
 * @method Organization        setIsActive()    Sets the current record's "is_active" value
 * @method Organization        setIsTop()       Sets the current record's "is_top" value
 * @method Organization        setNews()        Sets the current record's "News" collection
 * @method Organization        setUser()        Sets the current record's "User" collection
 * 
 * @package    mongolcom
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseOrganization extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('organization');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'autoincrement' => true,
             'length' => 4,
             ));
        $this->hasColumn('name', 'string', 252, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 252,
             ));
        $this->hasColumn('description', 'string', null, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('policy', 'string', null, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('contactus', 'string', null, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('logo', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('domain', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('website', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('type', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('out_image', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('lat', 'float', null, array(
             'type' => 'float',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('lng', 'float', null, array(
             'type' => 'float',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('is_active', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('is_top', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('News', array(
             'local' => 'id',
             'foreign' => 'org_id'));

        $this->hasMany('User', array(
             'local' => 'id',
             'foreign' => 'org_id'));
    }
}