| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <?php
- namespace App\Module\Fund\Events;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- /**
- * 资金转账事件
- */
- class FundTransferEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * 转出用户ID
- *
- * @var int
- */
- public int $fromUserId;
- /**
- * 转出资金账户ID
- *
- * @var int
- */
- public int $fromFundId;
- /**
- * 转入用户ID
- *
- * @var int
- */
- public int $toUserId;
- /**
- * 转入资金账户ID
- *
- * @var int
- */
- public int $toFundId;
- /**
- * 转账金额(毫)
- *
- * @var int
- */
- public int $amount;
- /**
- * 转出前余额(毫)
- *
- * @var int
- */
- public int $fromBeforeBalance;
- /**
- * 转出后余额(毫)
- *
- * @var int
- */
- public int $fromAfterBalance;
- /**
- * 转入前余额(毫)
- *
- * @var int
- */
- public int $toBeforeBalance;
- /**
- * 转入后余额(毫)
- *
- * @var int
- */
- public int $toAfterBalance;
- /**
- * 操作类型
- *
- * @var int
- */
- public int $operateType;
- /**
- * 操作ID
- *
- * @var int
- */
- public int $operateId;
- /**
- * 备注
- *
- * @var string
- */
- public string $remark;
- /**
- * 创建一个新的事件实例
- *
- * @param int $fromUserId 转出用户ID
- * @param int $fromFundId 转出资金账户ID
- * @param int $toUserId 转入用户ID
- * @param int $toFundId 转入资金账户ID
- * @param int $amount 转账金额(毫)
- * @param int $fromBeforeBalance 转出前余额(毫)
- * @param int $fromAfterBalance 转出后余额(毫)
- * @param int $toBeforeBalance 转入前余额(毫)
- * @param int $toAfterBalance 转入后余额(毫)
- * @param int $operateType 操作类型
- * @param int $operateId 操作ID
- * @param string $remark 备注
- * @return void
- */
- public function __construct(
- int $fromUserId,
- int $fromFundId,
- int $toUserId,
- int $toFundId,
- int $amount,
- int $fromBeforeBalance,
- int $fromAfterBalance,
- int $toBeforeBalance,
- int $toAfterBalance,
- int $operateType,
- int $operateId,
- string $remark
- ) {
- $this->fromUserId = $fromUserId;
- $this->fromFundId = $fromFundId;
- $this->toUserId = $toUserId;
- $this->toFundId = $toFundId;
- $this->amount = $amount;
- $this->fromBeforeBalance = $fromBeforeBalance;
- $this->fromAfterBalance = $fromAfterBalance;
- $this->toBeforeBalance = $toBeforeBalance;
- $this->toAfterBalance = $toAfterBalance;
- $this->operateType = $operateType;
- $this->operateId = $operateId;
- $this->remark = $remark;
- }
- }
|