Weak hands cannot be planted, meager skills have no foundation. Shallow wisdom is futile, how can one hope for a good name?扰扰从役倦，屑屑身事微。少壮轻年月，迟暮惜光辉。
<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php
namespace WP_Statistics\Models;

use WP_Statistics\Abstracts\BaseModel;
use WP_Statistics\Components\DateTime;
use WP_Statistics\Utils\Query;

class SummaryModel extends BaseModel
{
    public function getData($args = [])
    {
        $args = $this->parseArgs($args, [
            'date' => ''
        ]);

        $result = Query::select(['COALESCE(SUM(visitors), 0) as visitors', 'COALESCE(SUM(views), 0) as views'])
            ->from('summary_totals')
            ->whereDate('date', $args['date'])
            ->getRow();

        return $result;
    }

    public function getLastRecord()
    {
        $result = Query::select(['date', 'visitors', 'views'])
            ->from('summary_totals')
            ->orderBy('date', 'DESC')
            ->perPage(1, 1)
            ->getRow();

        return $result;
    }

    public function recordExists($args = [])
    {
        $args = $this->parseArgs($args, [
            'date' => ''
        ]);

        $result = Query::select('COUNT(*) as count')
            ->from('summary_totals')
            ->where('date', '=', $args['date'])
            ->getVar();

        return (bool) $result;
    }

    public function insert($args)
    {
        $data = [
            'date'     => $args['date'] ?? DateTime::get('now', 'Y-m-d'),
            'visitors' => $args['visitors'] ?? 0,
            'view