<?php
//
// Use this to initialize the database models
// Run it in command-line like
// php scripts/init_db.php
//
require_once __DIR__ . '/../../vendor/autoload.php';

// Load environment variables from the .env file at project root
Dotenv\Dotenv::createImmutable(__DIR__ . '/../../')->load();

// establish the db connection
use app\app;
app::init_db();

use app\models\addresses;
use app\models\carts;
use app\models\cart_items;
use app\models\categories;
use app\models\emails;
use app\models\invoices;
use app\models\magic_links;
use app\models\orders;
use app\models\order_items;
use app\models\products;
use app\models\quotes;
use app\models\quote_items;
use app\models\subscriptions;
use app\models\transactions;
use app\models\users;
use app\models\user_settings;

// db models go brrr...
addresses::init();
carts::init();
cart_items::init();
categories::init();
emails::init();
invoices::init();
magic_links::init();
order_items::init();
orders::init();
products::init();
quote_items::init();
quotes::init();
subscriptions::init();
transactions::init();
user_settings::init();
users::init();
