<?php

/**
 * BaseUserLog
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $user_id
 * @property string $log_type
 * @property string $model
 * @property integer $model_id
 * @property string $log
 * @property User $User
 * 
 * @method integer getUserId()   Returns the current record's "user_id" value
 * @method string  getLogType()  Returns the current record's "log_type" value
 * @method string  getModel()    Returns the current record's "model" value
 * @method integer getModelId()  Returns the current record's "model_id" value
 * @method string  getLog()      Returns the current record's "log" value
 * @method User    getUser()     Returns the current record's "User" value
 * @method UserLog setUserId()   Sets the current record's "user_id" value
 * @method UserLog setLogType()  Sets the current record's "log_type" value
 * @method UserLog setModel()    Sets the current record's "model" value
 * @method UserLog setModelId()  Sets the current record's "model_id" value
 * @method UserLog setLog()      Sets the current record's "log" value
 * @method UserLog setUser()     Sets the current record's "User" value
 * 
 * @package    sf
 * @subpackage model
 * @author     Atma
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseUserLog extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('user_log');
        $this->hasColumn('user_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('log_type', 'string', 50, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 50,
             ));
        $this->hasColumn('model', 'string', 50, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 50,
             ));
        $this->hasColumn('model_id', 'integer', null, array(
             'type' => 'integer',
             'notnull' => true,
             ));
        $this->hasColumn('log', 'string', null, array(
             'type' => 'string',
             ));


        $this->index('model_idx', array(
             'fields' => 
             array(
              0 => 'model',
             ),
             ));
        $this->index('model_id_idx', array(
             'fields' => 
             array(
              0 => 'model_id',
             ),
             ));
    }

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

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