KataoConfigMapBuilder.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. /**
  3. * This class adds structure of 'katao_config' 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 KataoConfigMapBuilder {
  15. /**
  16. * The (dot-path) name of this class
  17. */
  18. const CLASS_NAME = 'lib.model.map.KataoConfigMapBuilder';
  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_config');
  52. $tMap->setPhpName('KataoConfig');
  53. $tMap->setUseIdGenerator(true);
  54. $tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
  55. $tMap->addForeignKey('KATAO_MEMBER_ID', 'KataoMemberId', 'int', CreoleTypes::INTEGER, 'katao_member', 'ID', false, null);
  56. $tMap->addColumn('NAME', 'Name', 'string', CreoleTypes::VARCHAR, true, 255);
  57. $tMap->addColumn('ADDRESS', 'Address', 'string', CreoleTypes::LONGVARCHAR, false, null);
  58. $tMap->addColumn('PHONE', 'Phone', 'string', CreoleTypes::VARCHAR, true, 255);
  59. $tMap->addColumn('EMAIL', 'Email', 'string', CreoleTypes::VARCHAR, true, 255);
  60. $tMap->addColumn('SIRET_NUMBER', 'SiretNumber', 'string', CreoleTypes::CHAR, true, 14);
  61. $tMap->addColumn('TVA_NUMBER', 'TvaNumber', 'string', CreoleTypes::CHAR, true, 13);
  62. $tMap->addColumn('RCS_NUMBER', 'RcsNumber', 'string', CreoleTypes::VARCHAR, true, 255);
  63. $tMap->addColumn('CAPITAL', 'Capital', 'int', CreoleTypes::INTEGER, true, null);
  64. $tMap->addColumn('INITIAL_TRANSACTIONS_COUNT', 'InitialTransactionsCount', 'int', CreoleTypes::INTEGER, false, null);
  65. $tMap->addColumn('INITIAL_TRANSACTIONS_SUM', 'InitialTransactionsSum', 'double', CreoleTypes::FLOAT, false, null);
  66. $tMap->addColumn('DEFAULT_PRODUCT_PICTURE', 'DefaultProductPicture', 'string', CreoleTypes::VARCHAR, false, 255);
  67. $tMap->addColumn('DEFAULT_PRODUCT_MARGIN', 'DefaultProductMargin', 'int', CreoleTypes::INTEGER, false, null);
  68. $tMap->addColumn('DEFAULT_PRODUCT_SOL_PERCENT', 'DefaultProductSolPercent', 'int', CreoleTypes::INTEGER, false, null);
  69. $tMap->addColumn('MAILING_LIST_EMAIL', 'MailingListEmail', 'string', CreoleTypes::VARCHAR, false, 255);
  70. $tMap->addColumn('CART_VALIDATION_DAYS_NUMBER', 'CartValidationDaysNumber', 'int', CreoleTypes::INTEGER, true, null);
  71. $tMap->addColumn('ACCOUNTING_CODE_PREFIX_PURCHASE', 'AccountingCodePrefixPurchase', 'string', CreoleTypes::VARCHAR, true, 12);
  72. $tMap->addColumn('ACCOUNTING_CODE_PREFIX_SELL', 'AccountingCodePrefixSell', 'string', CreoleTypes::VARCHAR, true, 12);
  73. $tMap->addColumn('ACCOUNTING_CODE_BANK', 'AccountingCodeBank', 'string', CreoleTypes::VARCHAR, true, 12);
  74. $tMap->addColumn('ACCOUNTING_CODE_BANK_SOL', 'AccountingCodeBankSol', 'string', CreoleTypes::VARCHAR, true, 12);
  75. $tMap->addColumn('ACCOUNTING_CODE_CREDIT', 'AccountingCodeCredit', 'string', CreoleTypes::VARCHAR, true, 12);
  76. $tMap->addColumn('ACCOUNTING_CODE_ERROR_ADJUSTMENT_POSITIVE', 'AccountingCodeErrorAdjustmentPositive', 'string', CreoleTypes::VARCHAR, true, 12);
  77. $tMap->addColumn('ACCOUNTING_CODE_ERROR_ADJUSTMENT_NEGATIVE', 'AccountingCodeErrorAdjustmentNegative', 'string', CreoleTypes::VARCHAR, true, 12);
  78. $tMap->addColumn('ACCOUNTING_CODE_SOL_DISCOUNT', 'AccountingCodeSolDiscount', 'string', CreoleTypes::VARCHAR, true, 12);
  79. $tMap->addColumn('ACCOUNTING_CODE_FEES_SHIPPING', 'AccountingCodeFeesShipping', 'string', CreoleTypes::VARCHAR, true, 12);
  80. $tMap->addColumn('ACCOUNTING_CODE_FEES_BILLING', 'AccountingCodeFeesBilling', 'string', CreoleTypes::VARCHAR, true, 12);
  81. $tMap->addColumn('ACCOUNTING_CODE_DISCOUNT', 'AccountingCodeDiscount', 'string', CreoleTypes::VARCHAR, true, 12);
  82. $tMap->addColumn('MEMBER_FEE', 'MemberFee', 'double', CreoleTypes::FLOAT, false, null);
  83. $tMap->addColumn('ADDITIONAL_CURRENCY_NAME', 'AdditionalCurrencyName', 'string', CreoleTypes::VARCHAR, false, 255);
  84. $tMap->addColumn('DEBUG_EMAIL', 'DebugEmail', 'string', CreoleTypes::VARCHAR, false, 255);
  85. $tMap->addColumn('BANK_NAME', 'BankName', 'string', CreoleTypes::VARCHAR, false, 255);
  86. $tMap->addColumn('BANK_ACCOUNT', 'BankAccount', 'string', CreoleTypes::VARCHAR, false, 255);
  87. } // doBuild()
  88. } // KataoConfigMapBuilder