Public feed
#887702
<?php
class Product extends Doctrine_Record
{
public function setTableDefinition()
{
$this -> setTableName('products');
$this -> hasColumn('name', 'string', 50);
$this -> hasColumn('description', 'text');
$this -> hasColumn('image', 50);
$this -> hasColumn('price', 'decimal');
$this -> hasColumn('company', 'integer');
$this -> option('type', 'INNODB');
$this -> option('collate', 'utf8_general_ci');
$this -> option('charset', 'utf8');
}
public function setUp(){
$this -> hasOne('Company', array('local' => 'company', 'foreign' => 'id'));
}
}
?>