<?php

	namespace VLW\Database\Models\Coffee;

	use \VV;

	use VLW\API\Endpoints;
	use VLW\Database\Models\Model;
	use VLW\Database\Tables\Coffee\StatsTable;

	require_once VV::root("src/API/Endpoints.php");
	require_once VV::root("src/Database/Models/Model.php");
	require_once VV::root("src/Database/Tables/Coffee/Stats.php");
	require_once VV::root("src/Database/Models/Coffee/Stats.php");

	class Stats extends Model {
		public function __construct() {
			parent::__construct(Endpoints::COFFEE_STATS);
		}

		public static function all(array $params = []): array {
			return [];
		}

		public function week(): int {
			return $this->get(StatsTable::COUNT_WEEK->value) ?? 0;
		}

		public function week_average(): int {
			return $this->get(StatsTable::COUNT_WEEK_AVERAGE->value) ?? 0;
		}
	}