GoodsOptionStockChangeEvent.php 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: blank
  5. * Date: 2022/11/21
  6. * Time: 15:40
  7. */
  8. namespace app\common\modules\goods\events;
  9. use app\common\events\Event;
  10. use app\common\models\Goods;
  11. use app\common\models\GoodsOption;
  12. class GoodsOptionStockChangeEvent extends Event
  13. {
  14. protected $operation_type;
  15. /**
  16. * @var array
  17. */
  18. protected $parameters;
  19. /**
  20. * @var Goods
  21. */
  22. protected $goodsOption;
  23. public function __construct(GoodsOption $goodsOption, array $parameters = [], $operation_type = '')
  24. {
  25. $this->goodsOption = $goodsOption;
  26. $this->parameters = $parameters;
  27. $this->operation_type = $operation_type;
  28. }
  29. public function getType()
  30. {
  31. return $this->operation_type;
  32. }
  33. final public function getGoodsOption()
  34. {
  35. return $this->goodsOption;
  36. }
  37. final public function getParameters()
  38. {
  39. return $this->parameters;
  40. }
  41. }