<?php

/**
 * BaseReview
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $name
 * @property string $phone
 * @property text $body
 * @property string $file
 * @property string $lang
 * @property boolean $is_activated
 * @property Doctrine_Collection $Tags
 * @property Doctrine_Collection $ReviewTags
 * 
 * @method string              getName()         Returns the current record's "name" value
 * @method string              getPhone()        Returns the current record's "phone" value
 * @method text                getBody()         Returns the current record's "body" value
 * @method string              getFile()         Returns the current record's "file" value
 * @method string              getLang()         Returns the current record's "lang" value
 * @method boolean             getIsActivated()  Returns the current record's "is_activated" value
 * @method Doctrine_Collection getTags()         Returns the current record's "Tags" collection
 * @method Doctrine_Collection getReviewTags()   Returns the current record's "ReviewTags" collection
 * @method Review              setName()         Sets the current record's "name" value
 * @method Review              setPhone()        Sets the current record's "phone" value
 * @method Review              setBody()         Sets the current record's "body" value
 * @method Review              setFile()         Sets the current record's "file" value
 * @method Review              setLang()         Sets the current record's "lang" value
 * @method Review              setIsActivated()  Sets the current record's "is_activated" value
 * @method Review              setTags()         Sets the current record's "Tags" collection
 * @method Review              setReviewTags()   Sets the current record's "ReviewTags" collection
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseReview extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('review');
        $this->hasColumn('name', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('phone', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('body', 'text', null, array(
             'type' => 'text',
             ));
        $this->hasColumn('file', 'string', 255, array(
             'type' => 'string',
             'length' => 255,
             ));
        $this->hasColumn('lang', 'string', 2, array(
             'type' => 'string',
             'length' => 2,
             ));
        $this->hasColumn('is_activated', 'boolean', null, array(
             'type' => 'boolean',
             'notnull' => true,
             'default' => false,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('Tag as Tags', array(
             'refClass' => 'ReviewTags',
             'local' => 'review_id',
             'foreign' => 'tag_id',
             'onDelete' => 'CASCADE'));

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

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