UserVisit.php 522 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020/5/27
  7. *
  8. *
  9. */
  10. namespace app\common\model\user;
  11. use app\common\model\BaseModel;
  12. use app\common\model\store\product\Product;
  13. class UserVisit extends BaseModel
  14. {
  15. public static function tablePk(): ?string
  16. {
  17. return 'user_visit_id';
  18. }
  19. public static function tableName(): string
  20. {
  21. return 'user_visit';
  22. }
  23. public function product()
  24. {
  25. return $this->hasOne(Product::class,'product_id','type_id');
  26. }
  27. }