setTableName('vlna'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('zakaznik_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('test_zakaznik_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('nazev', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('email_vysledek_pouzit_z_vlny', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => false, )); $this->hasColumn('email_vysledek_predmet', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'default' => 'Výsledek Vašeho testu', 'length' => '255', )); $this->hasColumn('email_vysledek', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('email_kod_pouzit_z_vlny', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => false, )); $this->hasColumn('email_kod_predmet', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'default' => 'Testování znalostí jazyků - odkaz na test', 'length' => '255', )); $this->hasColumn('email_kod', 'clob', null, array( 'type' => 'clob', )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { parent::setUp(); $this->hasOne('Zakaznik', array( 'local' => 'zakaznik_id', 'foreign' => 'id')); $this->hasOne('Test_zakaznik', array( 'local' => 'test_zakaznik_id', 'foreign' => 'id')); $this->hasMany('Uchazec as Uchazeci', array( 'local' => 'id', 'foreign' => 'vlna_id')); } }