<?php

namespace App\Events;

use App\Models\OrderCommission;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;

class OrderCommissionSetedEvent implements ShouldQueue
{
    use Dispatchable, InteractsWithSockets, SerializesModels;

    public OrderCommission $order_commission;
    public string $template_id;
    public string $keyword2;



    /**
     * Create a new event instance.
     *
     * @param  OrderCommission  $order_commission
     * @return void
     */
    public function __construct(OrderCommission $order_commission)
    {
        Log::info('order_commission'.$order_commission->id.'触发订单佣金设置完成事件start');
        $this->order_commission = $order_commission;

        $this->template_id = config('wechat.tpls.commission_notice');

        $this->keyword2 = "有预计收益".$order_commission->commission_amount."元";

    }
}
