Skip to content

Instantly share code, notes, and snippets.

@delbono
Created August 30, 2010 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delbono/557838 to your computer and use it in GitHub Desktop.
Save delbono/557838 to your computer and use it in GitHub Desktop.
<?php
/**
* BaseOrdinativiMenuItem
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $menu_id
* @property string $name
* @property string $type
* @property integer $state
* @property boolean $enabled
* @property Doctrine_Collection $OrdinativiHealthState
* @property OrdinativiMenuItemDay $MenuItemDays
*
* @method integer getMenuId() Returns the current record's "menu_id" value
* @method string getName() Returns the current record's "name" value
* @method string getType() Returns the current record's "type" value
* @method integer getState() Returns the current record's "state" value
* @method boolean getEnabled() Returns the current record's "enabled" value
* @method Doctrine_Collection getOrdinativiHealthState() Returns the current record's "OrdinativiHealthState" collection
* @method OrdinativiMenuItemDay getMenuItemDays() Returns the current record's "MenuItemDays" value
* @method OrdinativiMenuItem setMenuId() Sets the current record's "menu_id" value
* @method OrdinativiMenuItem setName() Sets the current record's "name" value
* @method OrdinativiMenuItem setType() Sets the current record's "type" value
* @method OrdinativiMenuItem setState() Sets the current record's "state" value
* @method OrdinativiMenuItem setEnabled() Sets the current record's "enabled" value
* @method OrdinativiMenuItem setOrdinativiHealthState() Sets the current record's "OrdinativiHealthState" collection
* @method OrdinativiMenuItem setMenuItemDays() Sets the current record's "MenuItemDays" value
*
* @package ordinativi
* @subpackage model
* @author KEY5
* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
*/
abstract class BaseOrdinativiMenuItem extends sfDoctrineRecord
{
public function setTableDefinition()
{
$this->setTableName('ordinativi_menu_item');
$this->hasColumn('menu_id', 'integer', null, array(
'type' => 'integer',
'notnull' => true,
'default' => 0,
));
$this->hasColumn('name', 'string', 255, array(
'type' => 'string',
'notnull' => true,
'length' => 255,
));
$this->hasColumn('type', 'string', 3, array(
'type' => 'string',
'length' => 3,
));
$this->hasColumn('state', 'integer', null, array(
'type' => 'integer',
'notnull' => true,
'default' => 0,
));
$this->hasColumn('enabled', 'boolean', null, array(
'type' => 'boolean',
'notnull' => true,
'default' => 0,
));
}
public function setUp()
{
parent::setUp();
$this->hasMany('OrdinativiHealthState', array(
'local' => 'state',
'foreign' => 'id',
'onDelete' => 'CASCADE'));
$this->hasOne('OrdinativiMenuItemDay as MenuItemDays', array(
'local' => 'id',
'foreign' => 'item_id'));
$timestampable0 = new Doctrine_Template_Timestampable();
$this->actAs($timestampable0);
}
}
<?php
/**
* BaseOrdinativiMenuItemDay
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $menu_id
* @property integer $item_id
* @property integer $day
* @property integer $week
* @property boolean $enabled
* @property Doctrine_Collection $OrdinativiMenuItem
*
* @method integer getMenuId() Returns the current record's "menu_id" value
* @method integer getItemId() Returns the current record's "item_id" value
* @method integer getDay() Returns the current record's "day" value
* @method integer getWeek() Returns the current record's "week" value
* @method boolean getEnabled() Returns the current record's "enabled" value
* @method Doctrine_Collection getOrdinativiMenuItem() Returns the current record's "OrdinativiMenuItem" collection
* @method OrdinativiMenuItemDay setMenuId() Sets the current record's "menu_id" value
* @method OrdinativiMenuItemDay setItemId() Sets the current record's "item_id" value
* @method OrdinativiMenuItemDay setDay() Sets the current record's "day" value
* @method OrdinativiMenuItemDay setWeek() Sets the current record's "week" value
* @method OrdinativiMenuItemDay setEnabled() Sets the current record's "enabled" value
* @method OrdinativiMenuItemDay setOrdinativiMenuItem() Sets the current record's "OrdinativiMenuItem" collection
*
* @package ordinativi
* @subpackage model
* @author KEY5
* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
*/
abstract class BaseOrdinativiMenuItemDay extends sfDoctrineRecord
{
public function setTableDefinition()
{
$this->setTableName('ordinativi_menu_item_day');
$this->hasColumn('menu_id', 'integer', null, array(
'type' => 'integer',
'notnull' => true,
'default' => 0,
));
$this->hasColumn('item_id', 'integer', null, array(
'type' => 'integer',
'notnull' => true,
'default' => 0,
));
$this->hasColumn('day', 'integer', 3, array(
'type' => 'integer',
'notnull' => true,
'default' => 0,
'length' => 3,
));
$this->hasColumn('week', 'integer', 3, array(
'type' => 'integer',
'notnull' => true,
'default' => 0,
'length' => 3,
));
$this->hasColumn('enabled', 'boolean', null, array(
'type' => 'boolean',
'notnull' => true,
'default' => 0,
));
}
public function setUp()
{
parent::setUp();
$this->hasMany('OrdinativiMenuItem', array(
'local' => 'item_id',
'foreign' => 'id',
'onDelete' => 'CASCADE'));
$timestampable0 = new Doctrine_Template_Timestampable();
$this->actAs($timestampable0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment