<?php


$tables = [
	"user" => [
		"id" => "INTEGER PRIMARY KEY",
		"username" => "TEXT NOT NULL",
		"password" => "TEXT NOT NULL",
		"role" => "TEXT DEFAULT 'admin'",
		"credits" => "INTEGER DEFAULT 0",
		"owner_id" => "INTEGER",
		"created_at" => "DATETIME DEFAULT CURRENT_TIMESTAMP",
	],
	"dns" => [
		"id" => "INTEGER PRIMARY KEY",
		"title" => "TEXT",
		"url" => "TEXT",
	],
	"pkey" => [
		"id" => "INTEGER PRIMARY KEY",
		"key" => "TEXT",
	],
	"menualuser" => [
		"id" => "INTEGER PRIMARY KEY",
    	"title" => "TEXT",
		"username" => "TEXT",
		"password" => "TEXT",
		"expire_date" =>"TEXT",
		"owner_id" => "INTEGER",
		"user_type" => "TEXT DEFAULT 'client'",
		"max_devices" => "INTEGER DEFAULT 1",
		"created_at" => "DATETIME DEFAULT CURRENT_TIMESTAMP",
	],
	"credit_logs" => [
		"id" => "INTEGER PRIMARY KEY",
		"user_id" => "INTEGER",
		"amount" => "INTEGER",
		"action" => "TEXT",
		"description" => "TEXT",
		"performed_by" => "INTEGER",
		"date" => "DATETIME DEFAULT CURRENT_TIMESTAMP",
	],
	"panel_config" => [
		"id" => "INTEGER PRIMARY KEY",
		"config_key" => "TEXT UNIQUE",
		"config_value" => "TEXT",
	],
	"activity_logs" => [
		"id" => "INTEGER PRIMARY KEY",
		"user_id" => "INTEGER",
		"action_type" => "TEXT",
		"entity_type" => "TEXT",
		"entity_id" => "INTEGER",
		"entity_name" => "TEXT",
		"details" => "TEXT",
		"ip_address" => "TEXT",
		"date" => "DATETIME DEFAULT CURRENT_TIMESTAMP",
	],
];

?>
