FundCirculationModel.php 1.0 KB

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