<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

require_once './lib/php/DataBaseManager/DBManager.php';
require_once './lib/php/DataBaseManager/Entitie.php';
require_once './lib/php/Catcher/Catcher.php';

use DataBaseManager\Entitie\Entitie;
use DataBaseManager\DBManager\DBManager;
use function Catcher\recovery;

$config = (object) [
    'driver' => 'mysql',
    'host' => '127.0.0.1',
    'port' => 3306,
    'dbname' => 'anodb',
    'username' => 'root',
    'password' => 'root'
];

$entitie = new Entitie([
    'name varchar(32) not null',
    'type varchar(16) not null',
    'period varchar(16) not null', 
    'longitude double not null',
    'latitude double not null',
    'info_exist tinyint(1) not null',
    'slider json',
    'images json',
    'video text',
    'background text'
], 'settlements');

$db_manager = new DBManager($entitie, $config);
?>