CREATE DATABASE recharge;

USE recharge;

CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    mobile VARCHAR(15),
    password VARCHAR(100),
    balance INT DEFAULT 0
);

CREATE TABLE recharge_history (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT,
    number VARCHAR(15),
    amount INT,
    status VARCHAR(20),
    date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE admin (
    id INT AUTO_INCREMENT PRIMARY KEY,
    username VARCHAR(50),
    password VARCHAR(100)
);

INSERT INTO admin (username, password) VALUES ('admin', 'admin123');