mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
46 lines
879 B
PHP
46 lines
879 B
PHP
![]() |
<?php
|
||
|
|
||
|
|
||
|
|
||
|
class DropdownMapBuilder {
|
||
|
|
||
|
|
||
|
const CLASS_NAME = 'lib.model.map.DropdownMapBuilder';
|
||
|
|
||
|
|
||
|
private $dbMap;
|
||
|
|
||
|
|
||
|
public function isBuilt()
|
||
|
{
|
||
|
return ($this->dbMap !== null);
|
||
|
}
|
||
|
|
||
|
|
||
|
public function getDatabaseMap()
|
||
|
{
|
||
|
return $this->dbMap;
|
||
|
}
|
||
|
|
||
|
|
||
|
public function doBuild()
|
||
|
{
|
||
|
$this->dbMap = Propel::getDatabaseMap('propel');
|
||
|
|
||
|
$tMap = $this->dbMap->addTable('dropdown');
|
||
|
$tMap->setPhpName('Dropdown');
|
||
|
|
||
|
$tMap->setUseIdGenerator(true);
|
||
|
|
||
|
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
||
|
|
||
|
$tMap->addColumn('MENU', 'Menu', 'string', CreoleTypes::VARCHAR, true, 50);
|
||
|
|
||
|
$tMap->addColumn('VALUE', 'Value', 'string', CreoleTypes::VARCHAR, true, 50);
|
||
|
|
||
|
$tMap->addColumn('CREATED_AT', 'CreatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||
|
|
||
|
$tMap->addColumn('UPDATED_AT', 'UpdatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||
|
|
||
|
}
|
||
|
}
|