Updatedat.php 877 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\SalesRule\Model\ResourceModel\Report\Rule;
  7. /**
  8. * Rule report resource model with aggregation by updated at
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Updatedat extends \Magento\SalesRule\Model\ResourceModel\Report\Rule\Createdat
  13. {
  14. /**
  15. * Resource Report Rule constructor
  16. *
  17. * @return void
  18. */
  19. protected function _construct()
  20. {
  21. $this->_init('salesrule_coupon_aggregated_updated', 'id');
  22. }
  23. /**
  24. * Aggregate Coupons data by order updated at
  25. *
  26. * @param mixed|null $from
  27. * @param mixed|null $to
  28. * @return $this
  29. */
  30. public function aggregate($from = null, $to = null)
  31. {
  32. return $this->_aggregateByOrder('updated_at', $from, $to);
  33. }
  34. }