All pastes #903872 Raw Edit

Unnamed

public php v1 · immutable
·published 2008-02-14 15:30 UTC
rendered paste body
<?phpclass Promotion extends BaseRecord{    public function setTableDefinition()    {      $this->setTableName('promotions');      $this->hasColumn('id', 'integer', 4, array (      'alltypes' =>      array (      0 => 'integer',      ),      'ntype' => 'int(10) unsigned',      'unsigned' => 1,      'values' =>      array (      ),      'primary' => true,      'notnull' => true,      'autoincrement' => true,      ));      $this->hasColumn('product', 'integer', 4, array (      'alltypes' =>      array (      0 => 'integer',      ),      'ntype' => 'int(10) unsigned',      'unsigned' => 1,      'values' =>      array (      ),      'primary' => false,      'default' => '',      'notnull' => true,      'autoincrement' => false,      ));      $this->hasColumn('position', 'integer', 4, array (      'alltypes' =>      array (      0 => 'integer',      ),      'ntype' => 'int(10) unsigned',      'unsigned' => 1,      'values' =>      array (      ),      'primary' => false,      'default' => '',      'notnull' => true,      'autoincrement' => false,      ));    }        public function setUp()    {        $this -> hasOne('Product', array('local' => 'product', 'foreign' => 'id'));    }}?>