| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace App\Module\Promotion\Events;
- use App\Module\Promotion\Models\PromotionProfit;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- /**
- * 团队收益创建事件
- *
- * 当团队收益记录被创建时触发此事件。
- * 监听此事件可以执行如下操作:
- * 1. 发送通知
- * 2. 记录收益日志
- * 3. 更新用户的收益统计
- */
- class PromotionProfitCreatedEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * 团队收益模型
- *
- * @var PromotionProfit
- */
- public $profit;
- /**
- * 创建一个新的事件实例
- *
- * @param PromotionProfit $profit 团队收益模型
- * @return void
- */
- public function __construct(PromotionProfit $profit)
- {
- $this->profit = $profit;
- }
- }
|