1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/models/export/Cms_Category.php

19 lines
632 B
PHP

<?php
class Cms_Category extends Doctrine_Record
{
public static function initMetadata($class)
{
$class->setColumn('created', 'timestamp');
$class->setColumn('parent', 'integer', 11);
$class->setColumn('position', 'integer', 3);
$class->setColumn('active', 'integer', 11);
$class->setTableOption('collate', 'utf8_unicode_ci');
$class->setTableOption('charset', 'utf8');
$class->setTableOption('type', 'INNODB');
$class->addIndex('index_parent', array('fields' => array('parent')));
$class->hasMany('Cms_CategoryLanguages as langs', array('local' => 'id', 'foreign' => 'category_id'));
}
}