KataoMemberAdhesionMapBuilder.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * This class adds structure of 'katao_member_adhesion' table to 'propel' DatabaseMap object.
  4. *
  5. *
  6. *
  7. * These statically-built map classes are used by Propel to do runtime db structure discovery.
  8. * For example, the createSelectSql() method checks the type of a given column used in an
  9. * ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
  10. * (i.e. if it's a text column type).
  11. *
  12. * @package lib.model.map
  13. */
  14. class KataoMemberAdhesionMapBuilder {
  15. /**
  16. * The (dot-path) name of this class
  17. */
  18. const CLASS_NAME = 'lib.model.map.KataoMemberAdhesionMapBuilder';
  19. /**
  20. * The database map.
  21. */
  22. private $dbMap;
  23. /**
  24. * Tells us if this DatabaseMapBuilder is built so that we
  25. * don't have to re-build it every time.
  26. *
  27. * @return boolean true if this DatabaseMapBuilder is built, false otherwise.
  28. */
  29. public function isBuilt()
  30. {
  31. return ($this->dbMap !== null);
  32. }
  33. /**
  34. * Gets the databasemap this map builder built.
  35. *
  36. * @return the databasemap
  37. */
  38. public function getDatabaseMap()
  39. {
  40. return $this->dbMap;
  41. }
  42. /**
  43. * The doBuild() method builds the DatabaseMap
  44. *
  45. * @return void
  46. * @throws PropelException
  47. */
  48. public function doBuild()
  49. {
  50. $this->dbMap = Propel::getDatabaseMap('propel');
  51. $tMap = $this->dbMap->addTable('katao_member_adhesion');
  52. $tMap->setPhpName('KataoMemberAdhesion');
  53. $tMap->setUseIdGenerator(true);
  54. $tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
  55. $tMap->addForeignKey('KATAO_USER_ID', 'KataoUserId', 'int', CreoleTypes::INTEGER, 'katao_user', 'ID', true, null);
  56. $tMap->addColumn('YEAR', 'Year', 'int', CreoleTypes::DATE, true, null);
  57. $tMap->addColumn('AMOUNT', 'Amount', 'double', CreoleTypes::FLOAT, true, null);
  58. $tMap->addColumn('TYPE', 'Type', 'int', CreoleTypes::INTEGER, false, 2);
  59. $tMap->addColumn('PAYMENT_KIND', 'PaymentKind', 'int', CreoleTypes::INTEGER, true, null);
  60. $tMap->addColumn('CHECK_NO', 'CheckNo', 'string', CreoleTypes::VARCHAR, false, 255);
  61. } // doBuild()
  62. } // KataoMemberAdhesionMapBuilder