setTableName('plan'); $this->hasColumn('zakaznik_id', 'integer', null, array( 'type' => 'integer', 'notnull' => true, )); $this->hasColumn('name', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->hasColumn('type', 'enum', null, array( 'type' => 'enum', 'values' => array( 0 => 'static', 1 => 'periodic', ), 'default' => 'static', )); $this->hasColumn('period', 'integer', null, array( 'type' => 'integer', )); $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', 'onDelete' => 'CASCADE')); $this->hasMany('PlanLevel as Levels', array( 'local' => 'id', 'foreign' => 'plan_id')); $this->hasMany('PlanPracovnik as PracovnikRelations', array( 'local' => 'id', 'foreign' => 'plan_id')); $this->hasMany('PlanKurz as KurzRelations', array( 'local' => 'id', 'foreign' => 'plan_id')); $timestampable0 = new Doctrine_Template_Timestampable(); $this->actAs($timestampable0); } }