40 lines
609 B
Plaintext
40 lines
609 B
Plaintext
<?php
|
|
|
|
|
|
|
|
class CourseMapBuilder {
|
|
|
|
|
|
const CLASS_NAME = 'lib.model.map.CourseMapBuilder';
|
|
|
|
|
|
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('Course');
|
|
$tMap->setPhpName('Course');
|
|
|
|
$tMap->setUseIdGenerator(true);
|
|
|
|
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
|
|
|
$tMap->addColumn('SLUG', 'Slug', 'string', CreoleTypes::VARCHAR, false, 100);
|
|
|
|
}
|
|
} |