<?php

/**
 * BasePetitionContact
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $petition_id
 * @property integer $contact_id
 * @property string $secret
 * @property string $password
 * @property string $password_reset
 * @property date $password_reset_until
 * @property clob $comment
 * @property Petition $Petition
 * @property Contact $Contact
 * 
 * @method integer         getPetitionId()           Returns the current record's "petition_id" value
 * @method integer         getContactId()            Returns the current record's "contact_id" value
 * @method string          getSecret()               Returns the current record's "secret" value
 * @method string          getPassword()             Returns the current record's "password" value
 * @method string          getPasswordReset()        Returns the current record's "password_reset" value
 * @method date            getPasswordResetUntil()   Returns the current record's "password_reset_until" value
 * @method clob            getComment()              Returns the current record's "comment" value
 * @method Petition        getPetition()             Returns the current record's "Petition" value
 * @method Contact         getContact()              Returns the current record's "Contact" value
 * @method PetitionContact setPetitionId()           Sets the current record's "petition_id" value
 * @method PetitionContact setContactId()            Sets the current record's "contact_id" value
 * @method PetitionContact setSecret()               Sets the current record's "secret" value
 * @method PetitionContact setPassword()             Sets the current record's "password" value
 * @method PetitionContact setPasswordReset()        Sets the current record's "password_reset" value
 * @method PetitionContact setPasswordResetUntil()   Sets the current record's "password_reset_until" value
 * @method PetitionContact setComment()              Sets the current record's "comment" value
 * @method PetitionContact setPetition()             Sets the current record's "Petition" value
 * @method PetitionContact setContact()              Sets the current record's "Contact" value
 * 
 * @package    policat
 * @subpackage model
 * @author     Martin
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BasePetitionContact extends myDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('petition_contact');
        $this->hasColumn('petition_id', 'integer', 4, array(
             'type' => 'integer',
             'primary' => true,
             'length' => 4,
             ));
        $this->hasColumn('contact_id', 'integer', 4, array(
             'type' => 'integer',
             'primary' => true,
             'length' => 4,
             ));
        $this->hasColumn('secret', 'string', 40, array(
             'type' => 'string',
             'notnull' => true,
             'length' => 40,
             ));
        $this->hasColumn('password', 'string', 255, array(
             'type' => 'string',
             'notnull' => false,
             'length' => 255,
             ));
        $this->hasColumn('password_reset', 'string', 255, array(
             'type' => 'string',
             'notnull' => false,
             'length' => 255,
             ));
        $this->hasColumn('password_reset_until', 'date', null, array(
             'type' => 'date',
             'notnull' => false,
             ));
        $this->hasColumn('comment', 'clob', null, array(
             'type' => 'clob',
             'notnull' => false,
             ));

        $this->option('form', false);
        $this->option('filter', false);
    }

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

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