setTableName('pracovnik'); $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('specifikace_pracovnik', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('jmeno', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('prijmeni', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('email', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('pozice', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('osobni_cislo', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('nakladove_stredisko', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('oddeleni', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('nadrizeny', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('poznamka', 'clob', null, array( 'type' => 'clob', )); $this->hasColumn('heslo', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('pristup_app_pracovnik', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => 'false;', )); $this->hasColumn('vidi_strediska', 'string', 255, array( 'type' => 'string', 'length' => '255', )); $this->hasColumn('vidi_celou_dochazku', 'boolean', null, array( 'type' => 'boolean', 'notnull' => true, 'default' => 'false;', )); $this->option('type', 'InnoDB'); $this->option('collate', 'utf8_unicode_ci'); $this->option('charset', 'utf8'); } public function setUp() { $this->hasOne('Zakaznik', array( 'local' => 'zakaznik_id', 'foreign' => 'id')); $this->hasMany('Kurz as VidiKurzy', array( 'refClass' => 'PracovnikVidiKurz', 'local' => 'pracovnik_id', 'foreign' => 'kurz_id')); $this->hasMany('Uchazec as Uchazec_list', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('PracovnikVidiKurz as VidiKurzyRelace', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('Pracovnik_rozpocet as Rozpocet_list', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('Pracovnik_kurz as Pracovnik_kurz_list', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('Pracovnik_kurz_hodnoceni as Pracovnik_kurz_hodnoceni_list', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('Kurz_dochazka as Dochazka_list', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('Dotaznik as Dotazniky', array( 'refClass' => 'Dotaznik_pracovnik', 'local' => 'pracovnik_id', 'foreign' => 'dotaznik_id')); $this->hasMany('Dotaznik_pracovnik_odpoved as Dotaznik_pracovnik_odpoved_list', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('Dotaznik_pracovnik as Dotaznik_pracovnik_list', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('Document as Documents', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $this->hasMany('PlanPracovnik as PlanRelations', array( 'local' => 'id', 'foreign' => 'pracovnik_id')); $archivable0 = new Doctrine_Template_Archivable(array( 'expression' => array( 'symfony_context' => 'getUser()->getAttribute(\'archive_level\')', ), )); $this->actAs($archivable0); } }