UserBill.php 544 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\common\model\user;
  3. use app\common\model\BaseModel;
  4. class UserBill extends BaseModel
  5. {
  6. /**
  7. * @return string
  8. * @author zfy
  9. * @day 2020-03-30
  10. */
  11. public static function tablePk(): string
  12. {
  13. return 'bill_id';
  14. }
  15. /**
  16. * @return string
  17. * @author zfy
  18. * @day 2020-03-30
  19. */
  20. public static function tableName(): string
  21. {
  22. return 'user_bill';
  23. }
  24. public function user()
  25. {
  26. return $this->hasOne(User::class, 'uid', 'uid');
  27. }
  28. }