mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
46 lines
953 B
PHP
Executable File
46 lines
953 B
PHP
Executable File
<?php
|
|
|
|
|
|
|
|
class QualificationsMapBuilder {
|
|
|
|
|
|
const CLASS_NAME = 'lib.model.map.QualificationsMapBuilder';
|
|
|
|
|
|
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('qualifications');
|
|
$tMap->setPhpName('Qualifications');
|
|
|
|
$tMap->setUseIdGenerator(true);
|
|
|
|
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
|
|
|
$tMap->addForeignKey('USER_ID', 'UserId', 'int', CreoleTypes::INTEGER, 'user', 'ID', false, null);
|
|
|
|
$tMap->addForeignKey('DEVICE_ID', 'DeviceId', 'int', CreoleTypes::INTEGER, 'device', 'ID', false, null);
|
|
|
|
$tMap->addColumn('CREATED_AT', 'CreatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);
|
|
|
|
$tMap->addColumn('UPDATED_AT', 'UpdatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);
|
|
|
|
}
|
|
}
|