<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('NewsCategory', 'doctrine');

/**
 * BaseNewsCategory
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $news_id
 * @property integer $category_id
 * @property Category $Category
 * @property News $News
 * 
 * @method integer      getId()          Returns the current record's "id" value
 * @method integer      getNewsId()      Returns the current record's "news_id" value
 * @method integer      getCategoryId()  Returns the current record's "category_id" value
 * @method Category     getCategory()    Returns the current record's "Category" value
 * @method News         getNews()        Returns the current record's "News" value
 * @method NewsCategory setId()          Sets the current record's "id" value
 * @method NewsCategory setNewsId()      Sets the current record's "news_id" value
 * @method NewsCategory setCategoryId()  Sets the current record's "category_id" value
 * @method NewsCategory setCategory()    Sets the current record's "Category" value
 * @method NewsCategory setNews()        Sets the current record's "News" value
 * 
 * @package    mongolcom
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseNewsCategory extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('news_category');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('news_id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('category_id', 'integer', 2, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 2,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Category', array(
             'local' => 'category_id',
             'foreign' => 'id'));

        $this->hasOne('News', array(
             'local' => 'news_id',
             'foreign' => 'id'));
    }
}