<?php

namespace app\model;


use app\BaseModel;
use think\db\Query;

/**
 * 系统接口请求记录模型
 */
class SysRequestRecord extends BaseModel
{
    protected $name = "sys_request_record";
    protected $pk = "id";

    public function searchCreateTimeAttr(Query $query, array $value, array $data): void
    {
        $value = array_filter($value);
        count($value) >= 2 && $query->whereBetweenTime('request_time', $value[0], $value[1]);
    }
}