setTableName('plan_pracovnik'); $this->hasColumn('pracovnik_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('plan_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('level_id', 'integer', null, array( 'type' => 'integer', )); $this->hasColumn('is_met', 'boolean', null, array( 'type' => 'boolean', 'default' => false, )); $this->hasColumn('met_date', 'timestamp', null, array( 'type' => 'timestamp', 'notnull' => true, )); $this->hasColumn('validity', 'timestamp', null, array( 'type' => 'timestamp', )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Pracovnik', array( 'local' => 'pracovnik_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('Plan', array( 'local' => 'plan_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $this->hasOne('PlanLevel as Level', array( 'local' => 'level_id', 'foreign' => 'id', 'onDelete' => 'CASCADE')); $timestampable0 = new Doctrine_Template_Timestampable(); $this->actAs($timestampable0); } }