FundCirculationModel.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace App\Module\Fund\Models;
  3. use UCore\ModelCore;
  4. /**
  5. * 资金流通记录
  6. *
  7. * field start
  8. * @property int $id 自增
  9. * @property int $user_id 用户id
  10. * @property int $fund_id 资金ID
  11. * @property int $to_fund_id 流向资金账户
  12. * @property string $re_type 关联类型
  13. * @property int $re_id 关联类型
  14. * @property int $total_fee 充值钱数
  15. * @property int $create_time 创建时间
  16. * @property int $ok_time 处理时间
  17. * @property string $remark 备注信息
  18. * field end
  19. */
  20. class FundCirculationModel extends ModelCore
  21. {
  22. protected $table = 'fund_circulation';
  23. // attrlist start
  24. protected $fillable = [
  25. 'id',
  26. 'user_id',
  27. 'fund_id',
  28. 'to_fund_id',
  29. 're_type',
  30. 're_id',
  31. 'total_fee',
  32. 'create_time',
  33. 'ok_time',
  34. 'remark',
  35. ];
  36. // attrlist end
  37. public $timestamps = false;
  38. /**
  39. * 获取用户信息
  40. */
  41. public function user()
  42. {
  43. return $this->belongsTo('App\Models\User', 'user_id');
  44. }
  45. /**
  46. * 获取资金账户
  47. */
  48. public function fund()
  49. {
  50. return $this->belongsTo('App\Module\Fund\Models\FundModel', 'fund_id');
  51. }
  52. /**
  53. * 获取订单信息
  54. */
  55. public function order()
  56. {
  57. return $this->belongsTo('App\Module\Fund\Models\FundOrderModel', 'order_id');
  58. }
  59. }