mirror of
https://github.com/atlanticbiomedical/portal-legacy.git
synced 2025-07-02 01:47:28 -04:00
initial commit
This commit is contained in:
50
lib/model/map/DeviceTestDataMapBuilder.php
Executable file
50
lib/model/map/DeviceTestDataMapBuilder.php
Executable file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
class DeviceTestDataMapBuilder {
|
||||
|
||||
|
||||
const CLASS_NAME = 'lib.model.map.DeviceTestDataMapBuilder';
|
||||
|
||||
|
||||
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('device_test_data');
|
||||
$tMap->setPhpName('DeviceTestData');
|
||||
|
||||
$tMap->setUseIdGenerator(true);
|
||||
|
||||
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addForeignKey('DEVICE_CHECKUP_ID', 'DeviceCheckupId', 'int', CreoleTypes::INTEGER, 'device_checkup', 'ID', false, null);
|
||||
|
||||
$tMap->addColumn('NAME', 'Name', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('TYPE', 'Type', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('VALUE', 'Value', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('PASSFAIL', 'Passfail', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addColumn('UNIT', 'Unit', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user