UserRecharge.php 730 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020/6/2
  7. *
  8. *
  9. */
  10. namespace app\common\model\user;
  11. use app\common\model\BaseModel;
  12. /**
  13. * Class UserRecharge
  14. * @package app\common\model\user
  15. * @author xaboy
  16. * @day 2020/6/2
  17. */
  18. class UserRecharge extends BaseModel
  19. {
  20. /**
  21. * @return string|null
  22. * @author xaboy
  23. * @day 2020/6/2
  24. */
  25. public static function tablePk(): ?string
  26. {
  27. return 'recharge_id';
  28. }
  29. /**
  30. * @return string
  31. * @author xaboy
  32. * @day 2020/6/2
  33. */
  34. public static function tableName(): string
  35. {
  36. return 'user_recharge';
  37. }
  38. public function user()
  39. {
  40. return $this->hasOne(User::class, 'uid', 'uid');
  41. }
  42. }