<?php

/**
 * BaseTag
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $title
 * @property Doctrine_Collection $Articles
 * @property Doctrine_Collection $Videos
 * @property Doctrine_Collection $Products
 * @property Doctrine_Collection $Reviews
 * @property Doctrine_Collection $VideoTags
 * @property Doctrine_Collection $ArticleTags
 * @property Doctrine_Collection $ReviewTags
 * @property Doctrine_Collection $ProductTags
 * 
 * @method string              getTitle()       Returns the current record's "title" value
 * @method Doctrine_Collection getArticles()    Returns the current record's "Articles" collection
 * @method Doctrine_Collection getVideos()      Returns the current record's "Videos" collection
 * @method Doctrine_Collection getProducts()    Returns the current record's "Products" collection
 * @method Doctrine_Collection getReviews()     Returns the current record's "Reviews" collection
 * @method Doctrine_Collection getVideoTags()   Returns the current record's "VideoTags" collection
 * @method Doctrine_Collection getArticleTags() Returns the current record's "ArticleTags" collection
 * @method Doctrine_Collection getReviewTags()  Returns the current record's "ReviewTags" collection
 * @method Doctrine_Collection getProductTags() Returns the current record's "ProductTags" collection
 * @method Tag                 setTitle()       Sets the current record's "title" value
 * @method Tag                 setArticles()    Sets the current record's "Articles" collection
 * @method Tag                 setVideos()      Sets the current record's "Videos" collection
 * @method Tag                 setProducts()    Sets the current record's "Products" collection
 * @method Tag                 setReviews()     Sets the current record's "Reviews" collection
 * @method Tag                 setVideoTags()   Sets the current record's "VideoTags" collection
 * @method Tag                 setArticleTags() Sets the current record's "ArticleTags" collection
 * @method Tag                 setReviewTags()  Sets the current record's "ReviewTags" collection
 * @method Tag                 setProductTags() Sets the current record's "ProductTags" collection
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseTag extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('tag');
        $this->hasColumn('title', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('Article as Articles', array(
             'refClass' => 'ArticleTags',
             'local' => 'tag_id',
             'foreign' => 'article_id',
             'onDelete' => 'CASCADE'));

        $this->hasMany('Video as Videos', array(
             'refClass' => 'VideoTags',
             'local' => 'tag_id',
             'foreign' => 'video_id',
             'onDelete' => 'CASCADE'));

        $this->hasMany('Product as Products', array(
             'refClass' => 'ProductTags',
             'local' => 'tag_id',
             'foreign' => 'product_id',
             'onDelete' => 'CASCADE'));

        $this->hasMany('Review as Reviews', array(
             'refClass' => 'ReviewTags',
             'local' => 'tag_id',
             'foreign' => 'review_id',
             'onDelete' => 'CASCADE'));

        $this->hasMany('VideoTags', array(
             'local' => 'id',
             'foreign' => 'tag_id'));

        $this->hasMany('ArticleTags', array(
             'local' => 'id',
             'foreign' => 'tag_id'));

        $this->hasMany('ReviewTags', array(
             'local' => 'id',
             'foreign' => 'tag_id'));

        $this->hasMany('ProductTags', array(
             'local' => 'id',
             'foreign' => 'tag_id'));

        $timestampable0 = new Doctrine_Template_Timestampable();
        $i18n0 = new Doctrine_Template_I18n(array(
             'fields' => 
             array(
              0 => 'title',
             ),
             ));
        $this->actAs($timestampable0);
        $this->actAs($i18n0);
    }
}