* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ */ abstract class BaseTopJob extends sfDoctrineRecord { public function setTableDefinition() { $this->setTableName('top_job'); $this->hasColumn('job_id', 'integer', null, array( 'type' => 'integer', 'notnull' => false, )); $this->hasColumn('is_active', 'boolean', null, array( 'type' => 'boolean', 'notnull' => false, 'default' => false, )); $this->hasColumn('valid_from', 'date', null, array( 'type' => 'date', 'notnull' => false, )); $this->hasColumn('valid_to', 'date', null, array( 'type' => 'date', 'notnull' => false, )); $this->option('collate', 'utf8_czech_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Job', array( 'local' => 'job_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasMany('InvoiceItem as InvoiceItems', array( 'local' => 'id', 'foreign' => 'topjob_id')); $timestampable0 = new Doctrine_Template_Timestampable(); $this->actAs($timestampable0); } }