belongsTo(Wallet::class, 'wallet_id', 'id'); } /** * @Author FelixYin * @description 钱包交易关联提现记录 */ public function withdraw() { return $this->hasOne(WalletWithdrawRecord::class, 'trans_record_id', 'id'); } /** * @Author FelixYin * @description 交易关联支付记录 */ public function paymentRecords() { return $this->hasMany(WalletPaymentRecord::class, 'trans_record_id', 'id'); } /** * @Author FelixYin * @description 交易关联退款记录 */ public function refundRecords() { return $this->hasMany(WalletRefundRecord::class, 'trans_record_id', 'id'); } }