TimeLimit.php 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2017/3/29
  6. * Time: 下午5:23
  7. */
  8. namespace app\frontend\modules\coupon\services\models\TimeLimit;
  9. use app\frontend\modules\coupon\services\models\Coupon;
  10. use app\frontend\modules\orderGoods\models\PreOrderGoodsCollection;
  11. use app\frontend\modules\order\models\PreOrder;
  12. abstract class TimeLimit
  13. {
  14. /**
  15. * 优惠券数据库model
  16. * @var \app\common\models\Coupon
  17. */
  18. protected $dbCoupon;
  19. /**
  20. * @var Coupon
  21. */
  22. protected $coupon;
  23. /**
  24. * @var PreOrder
  25. */
  26. protected $orderModel;
  27. /**
  28. * @var PreOrderGoodsCollection
  29. */
  30. protected $orderGoodsModelGroup;
  31. public function __construct(Coupon $coupon)
  32. {
  33. $this->coupon = $coupon;
  34. $this->dbCoupon = $coupon->getMemberCoupon()->belongsToCoupon;
  35. $this->orderModel = $coupon->getPreOrder();
  36. }
  37. abstract public function valid();
  38. }