<?php

/**
 * BaseDiscount
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $title
 * @property string $utm
 * @property string $comment
 * @property string $url
 * @property Doctrine_Collection $DiscountPhone
 * 
 * @method string              getTitle()         Returns the current record's "title" value
 * @method string              getUtm()           Returns the current record's "utm" value
 * @method string              getComment()       Returns the current record's "comment" value
 * @method string              getUrl()           Returns the current record's "url" value
 * @method Doctrine_Collection getDiscountPhone() Returns the current record's "DiscountPhone" collection
 * @method Discount            setTitle()         Sets the current record's "title" value
 * @method Discount            setUtm()           Sets the current record's "utm" value
 * @method Discount            setComment()       Sets the current record's "comment" value
 * @method Discount            setUrl()           Sets the current record's "url" value
 * @method Discount            setDiscountPhone() Sets the current record's "DiscountPhone" collection
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseDiscount extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('discount');
        $this->hasColumn('title', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('utm', 'string', 255, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 255,
             ));
        $this->hasColumn('comment', 'string', 1000, array(
             'type' => 'string',
             'notnull' => false,
             'length' => 1000,
             ));
        $this->hasColumn('url', 'string', 20, array(
             'type' => 'string',
             'length' => 20,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('DiscountPhone', array(
             'local' => 'id',
             'foreign' => 'discount_id'));

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