Listings.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /**
  3. *
  4. * PHP Pro Bid $Id$ 7TpWuUNndfHVwBDz1rUqzAoDsI0XT6AA/3NqEqrjIMY=
  5. *
  6. * @link http://www.phpprobid.com
  7. * @copyright Copyright (c) 2017 Online Ventures Software & CodeCube SRL
  8. * @license http://www.phpprobid.com/license Commercial License
  9. *
  10. * @version 7.9 [rev.7.9.01]
  11. */
  12. /**
  13. * listings table
  14. */
  15. namespace Ppb\Db\Table;
  16. use Cube\Db\Table\AbstractTable;
  17. class Listings extends AbstractTable
  18. {
  19. /**
  20. *
  21. * table name
  22. *
  23. * @var string
  24. */
  25. protected $_name = 'listings';
  26. /**
  27. *
  28. * primary key
  29. *
  30. * @var string
  31. */
  32. protected $_primary = 'id';
  33. /**
  34. *
  35. * class name for row
  36. *
  37. * @var string
  38. */
  39. protected $_rowClass = '\Ppb\Db\Table\Row\Listing';
  40. /**
  41. * class name for rowset
  42. *
  43. * @var string
  44. */
  45. protected $_rowsetClass = '\Ppb\Db\Table\Rowset\Listings';
  46. /**
  47. *
  48. * cacheable queries
  49. *
  50. * @var bool
  51. */
  52. protected $_cacheableQueries = true;
  53. /**
  54. *
  55. * reference map
  56. *
  57. * @var array
  58. */
  59. protected $_referenceMap = array(
  60. 'Owner' => array(
  61. self::COLUMNS => 'user_id',
  62. self::REF_TABLE_CLASS => '\Ppb\Db\Table\Users',
  63. self::REF_COLUMNS => 'id',
  64. ),
  65. 'Category' => array(
  66. self::COLUMNS => 'category_id',
  67. self::REF_TABLE_CLASS => '\Ppb\Db\Table\Categories',
  68. self::REF_COLUMNS => 'id',
  69. ),
  70. 'AddlCategory' => array(
  71. self::COLUMNS => 'addl_category_id',
  72. self::REF_TABLE_CLASS => '\Ppb\Db\Table\Categories',
  73. self::REF_COLUMNS => 'id',
  74. ),
  75. 'Country' => array(
  76. self::COLUMNS => 'country',
  77. self::REF_TABLE_CLASS => '\Ppb\Db\Table\Locations',
  78. self::REF_COLUMNS => 'id',
  79. ),
  80. );
  81. /**
  82. *
  83. * dependent tables
  84. *
  85. * @var array
  86. */
  87. protected $_dependentTables = array(
  88. '\Ppb\Db\Table\Accounting',
  89. '\Ppb\Db\Table\Bids',
  90. '\Ppb\Db\Table\ListingsMedia',
  91. '\Ppb\Db\Table\ListingsWatch',
  92. '\Ppb\Db\Table\Offers',
  93. '\Ppb\Db\Table\SalesListings',
  94. '\Ppb\Db\Table\Messaging',
  95. '\Ppb\Db\Table\RecentlyViewedListings',
  96. );
  97. }