Files
pae.co.at/trunk/proactiveenglish/lib/model/map/.svn/text-base/EmployeeMapBuilder.php.svn-base
2017-03-02 21:57:21 -06:00

58 lines
1.4 KiB
Plaintext

<?php
class EmployeeMapBuilder {
const CLASS_NAME = 'lib.model.map.EmployeeMapBuilder';
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('Employee');
$tMap->setPhpName('Employee');
$tMap->setUseIdGenerator(true);
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('NAME', 'Name', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('DEGREES', 'Degrees', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('PHONE', 'Phone', 'string', CreoleTypes::VARCHAR, false, 25);
$tMap->addColumn('CELLPHONE', 'Cellphone', 'string', CreoleTypes::VARCHAR, false, 25);
$tMap->addColumn('EMAIL', 'Email', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('PICTURE', 'Picture', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('ACTIVE', 'Active', 'boolean', CreoleTypes::BOOLEAN, false, null);
$tMap->addForeignKey('POSITION', 'Position', 'int', CreoleTypes::INTEGER, 'LU_Employee_Position', 'ID', false, null);
$tMap->addColumn('SLUG', 'Slug', 'string', CreoleTypes::VARCHAR, false, 100);
$tMap->addColumn('SORT_ORDER', 'SortOrder', 'int', CreoleTypes::INTEGER, false, null);
}
}