42 lines
704 B
Plaintext
42 lines
704 B
Plaintext
<?php
|
|
|
|
|
|
|
|
class EventMapBuilder {
|
|
|
|
|
|
const CLASS_NAME = 'lib.model.map.EventMapBuilder';
|
|
|
|
|
|
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('Event');
|
|
$tMap->setPhpName('Event');
|
|
|
|
$tMap->setUseIdGenerator(true);
|
|
|
|
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
|
|
|
$tMap->addColumn('PICTURE', 'Picture', 'string', CreoleTypes::VARCHAR, false, 255);
|
|
|
|
$tMap->addColumn('EXPIRES_ON', 'ExpiresOn', 'int', CreoleTypes::TIMESTAMP, false, null);
|
|
|
|
}
|
|
} |