FundCirculationModel.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. protected $fillable = [
  38. 'user_id',
  39. 'fund_id',
  40. 'amount',
  41. 'type',
  42. 'status',
  43. 'remark',
  44. 'create_time',
  45. 'create_ip',
  46. 'update_time',
  47. 'update_ip',
  48. 'admin_id',
  49. 'admin_name',
  50. 'order_id',
  51. 'order_type'
  52. ];
  53. public $timestamps = false;
  54. /**
  55. * 获取用户信息
  56. */
  57. public function user()
  58. {
  59. return $this->belongsTo('App\Models\User', 'user_id');
  60. }
  61. /**
  62. * 获取资金账户
  63. */
  64. public function fund()
  65. {
  66. return $this->belongsTo('App\Module\Fund\Models\FundModel', 'fund_id');
  67. }
  68. /**
  69. * 获取订单信息
  70. */
  71. public function order()
  72. {
  73. return $this->belongsTo('App\Module\Fund\Models\FundOrderModel', 'order_id');
  74. }
  75. }