WalletPaymentRecord.php 667 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\SoftDeletes;
  4. use Slowlyo\OwlAdmin\Models\BaseModel as Model;
  5. /**
  6. * 钱包支付记录
  7. */
  8. class WalletPaymentRecord extends Model
  9. {
  10. use SoftDeletes;
  11. protected $table = 'wallet_payment_records';
  12. /**
  13. * @Author FelixYin
  14. * @description 支付记录所属交易
  15. */
  16. public function trans()
  17. {
  18. return $this->belongsTo('App\Models\WalletTransRecord', 'trans_record_id');
  19. }
  20. /**
  21. * @Author FelixYin
  22. * @description 支付记录所属钱包
  23. */
  24. public function wallet()
  25. {
  26. return $this->belongsTo('App\Models\Wallet', 'wallet_id');
  27. }
  28. }