
CREATE DATABASE investment_db;
USE investment_db;

CREATE TABLE users(id INT AUTO_INCREMENT PRIMARY KEY,email VARCHAR(100),password VARCHAR(255));
CREATE TABLE admins(id INT AUTO_INCREMENT PRIMARY KEY,email VARCHAR(100),password VARCHAR(255),role VARCHAR(50));
CREATE TABLE plans(id INT AUTO_INCREMENT PRIMARY KEY,name VARCHAR(100),description TEXT,duration INT);
CREATE TABLE wallets(id INT AUTO_INCREMENT PRIMARY KEY,currency VARCHAR(20),address VARCHAR(255),active TINYINT DEFAULT 1);
CREATE TABLE payments(id INT AUTO_INCREMENT PRIMARY KEY,user_id INT,wallet TEXT,txid TEXT,status VARCHAR(20));

INSERT INTO admins(email,password,role) VALUES('admin@site.com','$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi','super');
