<?php




namespace app\common\model\user;


use app\common\model\BaseModel;
use app\common\model\store\product\Product;

class UserVisit extends BaseModel
{

    public static function tablePk(): ?string
    {
        return 'user_visit_id';
    }

    public static function tableName(): string
    {
        return 'user_visit';
    }

    public function product()
    {
        return $this->hasOne(Product::class,'product_id','type_id');
    }

    public function user()
    {
        return $this->hasOne(User::class, 'uid', 'uid');
    }
}