implement separated models

This commit is contained in:
yggverse 2024-08-02 22:00:28 +03:00
parent 47b7344e2e
commit 10534df069
17 changed files with 662 additions and 520 deletions

View file

@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace Yggverse\Yoda\Model\Database;
use \Pdo;
class Auth
{
public Pdo $connection;
public function __construct(
Pdo $connection
) {
// Init parent connection
$this->connection = $connection;
// Init database structure
$this->connection->query('
CREATE TABLE IF NOT EXISTS `auth`
(
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
`time` INTEGER NOT NULL,
`active` INTEGER NOT NULL,
`identity` INTEGER NOT NULL,
`request` VARCHAR(1024) NOT NULL
)
');
}
}