| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?php
- namespace App\Module\Fund\Events;
- use App\Module\Fund\Models\FundAccount;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- /**
- * 资金变更事件
- */
- class FundChangedEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * 用户ID
- *
- * @var int
- */
- public int $userId;
- /**
- * 资金账户ID
- *
- * @var int
- */
- public int $fundId;
- /**
- * 变更金额(毫)
- *
- * @var int
- */
- public int $amount;
- /**
- * 变更前余额(毫)
- *
- * @var int
- */
- public int $beforeBalance;
- /**
- * 变更后余额(毫)
- *
- * @var int
- */
- public int $afterBalance;
- /**
- * 操作类型
- *
- * @var int
- */
- public int $operateType;
- /**
- * 操作ID
- *
- * @var int|string
- */
- public $operateId;
- /**
- * 备注
- *
- * @var string
- */
- public string $remark;
- /**
- * 创建一个新的事件实例
- *
- * @param int $userId 用户ID
- * @param int $fundId 资金账户ID
- * @param int $amount 变更金额(毫)
- * @param int $beforeBalance 变更前余额(毫)
- * @param int $afterBalance 变更后余额(毫)
- * @param int $operateType 操作类型
- * @param int|string $operateId 操作ID
- * @param string $remark 备注
- * @return void
- */
- public function __construct(
- int $userId,
- int $fundId,
- int $amount,
- int $beforeBalance,
- int $afterBalance,
- int $operateType,
- $operateId,
- string $remark
- ) {
- $this->userId = $userId;
- $this->fundId = $fundId;
- $this->amount = $amount;
- $this->beforeBalance = $beforeBalance;
- $this->afterBalance = $afterBalance;
- $this->operateType = $operateType;
- $this->operateId = $operateId;
- $this->remark = $remark;
- }
- }
|