<?php

/**
 * BaseBasketOffer
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $amount
 * @property integer $basket_id
 * @property integer $offer_id
 * @property decimal $price
 * @property Offer $Offer
 * @property Basket $Basket
 * 
 * @method integer     getAmount()    Returns the current record's "amount" value
 * @method integer     getBasketId()  Returns the current record's "basket_id" value
 * @method integer     getOfferId()   Returns the current record's "offer_id" value
 * @method decimal     getPrice()     Returns the current record's "price" value
 * @method Offer       getOffer()     Returns the current record's "Offer" value
 * @method Basket      getBasket()    Returns the current record's "Basket" value
 * @method BasketOffer setAmount()    Sets the current record's "amount" value
 * @method BasketOffer setBasketId()  Sets the current record's "basket_id" value
 * @method BasketOffer setOfferId()   Sets the current record's "offer_id" value
 * @method BasketOffer setPrice()     Sets the current record's "price" value
 * @method BasketOffer setOffer()     Sets the current record's "Offer" value
 * @method BasketOffer setBasket()    Sets the current record's "Basket" value
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseBasketOffer extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('basket_offer');
        $this->hasColumn('amount', 'integer', null, array(
             'type' => 'integer',
             'default' => 1,
             'notnull' => true,
             ));
        $this->hasColumn('basket_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('offer_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('price', 'decimal', null, array(
             'type' => 'decimal',
             'notnull' => true,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Offer', array(
             'local' => 'offer_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));

        $this->hasOne('Basket', array(
             'local' => 'basket_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));
    }
}