<?php

namespace app\admin\model;

use think\Model;

class Userproduct extends Model
{
    public function getUserproduct($condition)
    {
        $select = [
            'userProduct_dayNumber',
            'userProduct_buyTime',
            'userProduct_identity',
            'userProduct_maturityTime',
            'user_email',
            'product_name',
        ];
        $result = $this
            ->field($select)
            ->alias('a')
            ->join('user b', 'a.user_id = b.user_id')
            ->join('product c', 'a.product_id = c.product_id')
            ->where($condition)
            ->paginate(10);
        return $result;
    }


}
