<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('News', 'doctrine');

/**
 * BaseNews
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $created_by
 * @property integer $org_id
 * @property string $title
 * @property string $description
 * @property string $body
 * @property string $image_small
 * @property string $image_medium
 * @property string $image_big
 * @property string $image_original
 * @property integer $is_top
 * @property integer $is_featured
 * @property integer $featured_toim
 * @property integer $stop_press
 * @property integer $is_archived
 * @property integer $is_published
 * @property integer $category_id
 * @property integer $type
 * @property integer $is_iframe
 * @property integer $publisher_id
 * @property string $video_path
 * @property timestamp $created_at
 * @property timestamp $published_at
 * @property integer $allow_comment
 * @property integer $is_wall
 * @property integer $is_sub_featured
 * @property integer $main_photo_show
 * @property User $User
 * @property Category $Category
 * @property Organization $Organization
 * @property Doctrine_Collection $NewsCategory
 * @property Doctrine_Collection $NewsStat
 * @property Doctrine_Collection $NewsTag
 * 
 * @method integer             getId()              Returns the current record's "id" value
 * @method integer             getCreatedBy()       Returns the current record's "created_by" value
 * @method integer             getOrgId()           Returns the current record's "org_id" value
 * @method string              getTitle()           Returns the current record's "title" value
 * @method string              getDescription()     Returns the current record's "description" value
 * @method string              getBody()            Returns the current record's "body" value
 * @method string              getImageSmall()      Returns the current record's "image_small" value
 * @method string              getImageMedium()     Returns the current record's "image_medium" value
 * @method string              getImageBig()        Returns the current record's "image_big" value
 * @method string              getImageOriginal()   Returns the current record's "image_original" value
 * @method integer             getIsTop()           Returns the current record's "is_top" value
 * @method integer             getIsFeatured()      Returns the current record's "is_featured" value
 * @method integer             getFeaturedToim()    Returns the current record's "featured_toim" value
 * @method integer             getStopPress()       Returns the current record's "stop_press" value
 * @method integer             getIsArchived()      Returns the current record's "is_archived" value
 * @method integer             getIsPublished()     Returns the current record's "is_published" value
 * @method integer             getCategoryId()      Returns the current record's "category_id" value
 * @method integer             getType()            Returns the current record's "type" value
 * @method integer             getIsIframe()        Returns the current record's "is_iframe" value
 * @method integer             getPublisherId()     Returns the current record's "publisher_id" value
 * @method string              getVideoPath()       Returns the current record's "video_path" value
 * @method timestamp           getCreatedAt()       Returns the current record's "created_at" value
 * @method timestamp           getPublishedAt()     Returns the current record's "published_at" value
 * @method integer             getAllowComment()    Returns the current record's "allow_comment" value
 * @method integer             getIsWall()          Returns the current record's "is_wall" value
 * @method integer             getIsSubFeatured()   Returns the current record's "is_sub_featured" value
 * @method integer             getMainPhotoShow()   Returns the current record's "main_photo_show" value
 * @method User                getUser()            Returns the current record's "User" value
 * @method Category            getCategory()        Returns the current record's "Category" value
 * @method Organization        getOrganization()    Returns the current record's "Organization" value
 * @method Doctrine_Collection getNewsCategory()    Returns the current record's "NewsCategory" collection
 * @method Doctrine_Collection getNewsStat()        Returns the current record's "NewsStat" collection
 * @method Doctrine_Collection getNewsTag()         Returns the current record's "NewsTag" collection
 * @method News                setId()              Sets the current record's "id" value
 * @method News                setCreatedBy()       Sets the current record's "created_by" value
 * @method News                setOrgId()           Sets the current record's "org_id" value
 * @method News                setTitle()           Sets the current record's "title" value
 * @method News                setDescription()     Sets the current record's "description" value
 * @method News                setBody()            Sets the current record's "body" value
 * @method News                setImageSmall()      Sets the current record's "image_small" value
 * @method News                setImageMedium()     Sets the current record's "image_medium" value
 * @method News                setImageBig()        Sets the current record's "image_big" value
 * @method News                setImageOriginal()   Sets the current record's "image_original" value
 * @method News                setIsTop()           Sets the current record's "is_top" value
 * @method News                setIsFeatured()      Sets the current record's "is_featured" value
 * @method News                setFeaturedToim()    Sets the current record's "featured_toim" value
 * @method News                setStopPress()       Sets the current record's "stop_press" value
 * @method News                setIsArchived()      Sets the current record's "is_archived" value
 * @method News                setIsPublished()     Sets the current record's "is_published" value
 * @method News                setCategoryId()      Sets the current record's "category_id" value
 * @method News                setType()            Sets the current record's "type" value
 * @method News                setIsIframe()        Sets the current record's "is_iframe" value
 * @method News                setPublisherId()     Sets the current record's "publisher_id" value
 * @method News                setVideoPath()       Sets the current record's "video_path" value
 * @method News                setCreatedAt()       Sets the current record's "created_at" value
 * @method News                setPublishedAt()     Sets the current record's "published_at" value
 * @method News                setAllowComment()    Sets the current record's "allow_comment" value
 * @method News                setIsWall()          Sets the current record's "is_wall" value
 * @method News                setIsSubFeatured()   Sets the current record's "is_sub_featured" value
 * @method News                setMainPhotoShow()   Sets the current record's "main_photo_show" value
 * @method News                setUser()            Sets the current record's "User" value
 * @method News                setCategory()        Sets the current record's "Category" value
 * @method News                setOrganization()    Sets the current record's "Organization" value
 * @method News                setNewsCategory()    Sets the current record's "NewsCategory" collection
 * @method News                setNewsStat()        Sets the current record's "NewsStat" collection
 * @method News                setNewsTag()         Sets the current record's "NewsTag" collection
 * 
 * @package    mongolcom
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseNews extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('news');
        $this->hasColumn('id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'autoincrement' => true,
             'length' => 4,
             ));
        $this->hasColumn('created_by', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('org_id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('title', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('description', 'string', null, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('body', 'string', null, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => '',
             ));
        $this->hasColumn('image_small', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('image_medium', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('image_big', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('image_original', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('is_top', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('is_featured', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('featured_toim', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('stop_press', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('is_archived', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('is_published', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('category_id', 'integer', 2, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 2,
             ));
        $this->hasColumn('type', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('is_iframe', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('publisher_id', 'integer', 4, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 4,
             ));
        $this->hasColumn('video_path', 'string', 255, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 255,
             ));
        $this->hasColumn('created_at', 'timestamp', 25, array(
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 25,
             ));
        $this->hasColumn('published_at', 'timestamp', 25, array(
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'notnull' => false,
             'autoincrement' => false,
             'length' => 25,
             ));
        $this->hasColumn('allow_comment', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '1',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('is_wall', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('is_sub_featured', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '0',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
        $this->hasColumn('main_photo_show', 'integer', 1, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'default' => '1',
             'notnull' => true,
             'autoincrement' => false,
             'length' => 1,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('User', array(
             'local' => 'created_by',
             'foreign' => 'id'));

        $this->hasOne('Category', array(
             'local' => 'category_id',
             'foreign' => 'id'));

        $this->hasOne('Organization', array(
             'local' => 'org_id',
             'foreign' => 'id'));

        $this->hasMany('NewsCategory', array(
             'local' => 'id',
             'foreign' => 'news_id'));

        $this->hasMany('NewsStat', array(
             'local' => 'id',
             'foreign' => 'news_id'));

        $this->hasMany('NewsTag', array(
             'local' => 'id',
             'foreign' => 'news_id'));
    }
}