Backflow.php 588 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Models;
  3. /**
  4. * @property $date
  5. * @property $recharge_amount
  6. * @property $withdrawal_amount
  7. * @property $status
  8. * @property $backflow_ratio
  9. * @property $member_id
  10. * @property $amount
  11. *
  12. */
  13. class Backflow extends BaseModel
  14. {
  15. protected $table = 'backflow';
  16. protected $fillable = ['date', 'member_id', 'recharge_amount', 'withdrawal_amount', 'backflow_ratio', 'amount', 'status'];
  17. function user()
  18. {
  19. return $this->belongsTo(User::class, 'member_id', 'member_id')
  20. ->select(['id', 'member_id', 'username', 'first_name']);
  21. }
  22. }