LotteryLuckyUser.php 495 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class LotteryLuckyUser extends Model
  5. {
  6. public function good()
  7. {
  8. return $this->hasOne(LotteryActivityGoods::class, 'id','good_id');
  9. }
  10. public function user()
  11. {
  12. return $this->hasOne(User::class, 'id','uid');
  13. }
  14. public function lotteryuser(){
  15. return $this->hasOne(LotteryUser::class, 'uid','uid');
  16. }
  17. public function emp(){
  18. return $this->hasOne(Employee::class, 'id','empid');
  19. }
  20. }