UploadTableMapBuilder.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * This class adds structure of 'upload' table to 'propel' DatabaseMap object.
  4. *
  5. *
  6. * This class was autogenerated by Propel 1.3.0-dev on:
  7. *
  8. * Sat Sep 26 07:07:41 2009
  9. *
  10. *
  11. * These statically-built map classes are used by Propel to do runtime db structure discovery.
  12. * For example, the createSelectSql() method checks the type of a given column used in an
  13. * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
  14. * (i.e. if it's a text column type).
  15. *
  16. * @package lib.model.map
  17. */
  18. class UploadTableMapBuilder implements MapBuilder {
  19. /**
  20. * The (dot-path) name of this class
  21. */
  22. const CLASS_NAME = 'lib.model.map.UploadTableMapBuilder';
  23. /**
  24. * The database map.
  25. */
  26. private $dbMap;
  27. /**
  28. * Tells us if this DatabaseMapBuilder is built so that we
  29. * don't have to re-build it every time.
  30. *
  31. * @return boolean true if this DatabaseMapBuilder is built, false otherwise.
  32. */
  33. public function isBuilt()
  34. {
  35. return ($this->dbMap !== null);
  36. }
  37. /**
  38. * Gets the databasemap this map builder built.
  39. *
  40. * @return the databasemap
  41. */
  42. public function getDatabaseMap()
  43. {
  44. return $this->dbMap;
  45. }
  46. /**
  47. * The doBuild() method builds the DatabaseMap
  48. *
  49. * @return void
  50. * @throws PropelException
  51. */
  52. public function doBuild()
  53. {
  54. $this->dbMap = Propel::getDatabaseMap(UploadTablePeer::DATABASE_NAME);
  55. $tMap = $this->dbMap->addTable(UploadTablePeer::TABLE_NAME);
  56. $tMap->setPhpName('UploadTable');
  57. $tMap->setClassname('UploadTable');
  58. $tMap->setUseIdGenerator(true);
  59. $tMap->addPrimaryKey('ID', 'Id', 'INTEGER', true, 11);
  60. $tMap->addColumn('USER', 'User', 'VARCHAR', true, 25);
  61. $tMap->addColumn('DAYTIME', 'Daytime', 'TIMESTAMP', true, null);
  62. $tMap->addColumn('URL', 'Url', 'LONGVARCHAR', true, null);
  63. $tMap->addColumn('FILENAME', 'Filename', 'LONGVARCHAR', true, null);
  64. $tMap->addColumn('FILESIZE', 'Filesize', 'INTEGER', true, 10);
  65. $tMap->addColumn('STATE', 'State', 'CHAR', true, null);
  66. $tMap->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null);
  67. $tMap->addForeignKey('CATEGORY_ID', 'CategoryId', 'INTEGER', 'category', 'ID', true, 11);
  68. } // doBuild()
  69. } // UploadTableMapBuilder