<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('CA_ALARMA', 'doctrine');

/**
 * BaseCA_ALARMA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_alarma
 * @property integer $id_tipo_alarma
 * @property integer $numero
 * @property string $descripcion
 * @property integer $orden
 * @property integer $estado
 * @property string $comando
 * @property CA_TIPO_ALARMA $CA_TIPO_ALARMA
 * @property Doctrine_Collection $CA_ADMINISTRA_ALARMA
 * 
 * @method integer             getIdAlarma()             Returns the current record's "id_alarma" value
 * @method integer             getIdTipoAlarma()         Returns the current record's "id_tipo_alarma" value
 * @method integer             getNumero()               Returns the current record's "numero" value
 * @method string              getDescripcion()          Returns the current record's "descripcion" value
 * @method integer             getOrden()                Returns the current record's "orden" value
 * @method integer             getEstado()               Returns the current record's "estado" value
 * @method string              getComando()              Returns the current record's "comando" value
 * @method CA_TIPO_ALARMA      getCATIPOALARMA()         Returns the current record's "CA_TIPO_ALARMA" value
 * @method Doctrine_Collection getCAADMINISTRAALARMA()   Returns the current record's "CA_ADMINISTRA_ALARMA" collection
 * @method CA_ALARMA           setIdAlarma()             Sets the current record's "id_alarma" value
 * @method CA_ALARMA           setIdTipoAlarma()         Sets the current record's "id_tipo_alarma" value
 * @method CA_ALARMA           setNumero()               Sets the current record's "numero" value
 * @method CA_ALARMA           setDescripcion()          Sets the current record's "descripcion" value
 * @method CA_ALARMA           setOrden()                Sets the current record's "orden" value
 * @method CA_ALARMA           setEstado()               Sets the current record's "estado" value
 * @method CA_ALARMA           setComando()              Sets the current record's "comando" value
 * @method CA_ALARMA           setCATIPOALARMA()         Sets the current record's "CA_TIPO_ALARMA" value
 * @method CA_ALARMA           setCAADMINISTRAALARMA()   Sets the current record's "CA_ADMINISTRA_ALARMA" collection
 * 
 * @package    ProyectoSchema
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseCA_ALARMA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_ALARMA');
        $this->hasColumn('id_alarma', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_alarma', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('numero', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 500, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('orden', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('comando', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('CA_TIPO_ALARMA', array(
             'local' => 'id_tipo_alarma',
             'foreign' => 'id_tipo_alarma'));

        $this->hasMany('CA_ADMINISTRA_ALARMA', array(
             'local' => 'id_alarma',
             'foreign' => 'id_alarma'));
    }
}