FundCirculationModel.php 981 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace App\Module\Fund\Models;
  3. use UCore\ModelCore;
  4. class FundCirculationModel extends ModelCore
  5. {
  6. protected $table = 'fund_circulation';
  7. protected $fillable = [
  8. 'user_id',
  9. 'fund_id',
  10. 'amount',
  11. 'type',
  12. 'status',
  13. 'remark',
  14. 'create_time',
  15. 'create_ip',
  16. 'update_time',
  17. 'update_ip',
  18. 'admin_id',
  19. 'admin_name',
  20. 'order_id',
  21. 'order_type'
  22. ];
  23. public $timestamps = false;
  24. /**
  25. * 获取用户信息
  26. */
  27. public function user()
  28. {
  29. return $this->belongsTo('App\Models\User', 'user_id');
  30. }
  31. /**
  32. * 获取资金账户
  33. */
  34. public function fund()
  35. {
  36. return $this->belongsTo('App\Module\Fund\Models\FundModel', 'fund_id');
  37. }
  38. /**
  39. * 获取订单信息
  40. */
  41. public function order()
  42. {
  43. return $this->belongsTo('App\Module\Fund\Models\FundOrderModel', 'order_id');
  44. }
  45. }