-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 14, 2026 at 04:45 PM
-- Server version: 10.4.28-MariaDB
-- PHP Version: 8.2.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `sb123`
--

-- --------------------------------------------------------

--
-- Table structure for table `admins`
--

CREATE TABLE `admins` (
  `id` int(11) NOT NULL,
  `username` varchar(100) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `fullname` varchar(255) DEFAULT NULL,
  `role` varchar(50) DEFAULT 'admin',
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `admins`
--

INSERT INTO `admins` (`id`, `username`, `password_hash`, `fullname`, `role`, `is_active`, `created_at`) VALUES
(1, 'manager', 'Aa123456', 'System Manager', 'super_admin', 1, '2026-05-14 13:04:33');

-- --------------------------------------------------------

--
-- Table structure for table `info`
--

CREATE TABLE `info` (
  `id` int(11) NOT NULL,
  `orderNumber` varchar(100) DEFAULT NULL,
  `fullname` varchar(255) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `city` varchar(150) DEFAULT NULL,
  `country` varchar(150) DEFAULT NULL,
  `zipcode` varchar(50) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `iban` varchar(255) DEFAULT NULL,
  `wallet_number` varchar(100) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT 0.00,
  `password_hash` varchar(255) DEFAULT NULL,
  `status` enum('pending','approved','rejected','processing') DEFAULT 'pending',
  `message` text DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `acount` varchar(255) DEFAULT NULL,
  `ip_address` varchar(100) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `cvv` varchar(255) DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `info`
--

INSERT INTO `info` (`id`, `orderNumber`, `fullname`, `username`, `email`, `phone`, `address`, `city`, `country`, `zipcode`, `bank_name`, `iban`, `wallet_number`, `amount`, `password_hash`, `status`, `message`, `notes`, `acount`, `ip_address`, `user_agent`, `created_at`, `updated_at`, `cvv`, `code`) VALUES
(1, NULL, 'jhgjgjg', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '22222', '32131321', '97979778', 500.00, '123', 'pending', NULL, NULL, '97979778', NULL, NULL, '2026-05-14 14:33:03', '2026-05-14 14:33:03', NULL, NULL),
(2, '', 'dw dw', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0123 5464 6564', '100', 85555.00, NULL, 'pending', NULL, NULL, '100', NULL, NULL, '2026-05-14 14:38:33', '2026-05-14 14:38:33', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `info_old`
--

CREATE TABLE `info_old` (
  `id` int(11) NOT NULL,
  `orderNumber` varchar(100) DEFAULT NULL,
  `fullname` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(100) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `city` varchar(150) DEFAULT NULL,
  `country` varchar(150) DEFAULT NULL,
  `zipcode` varchar(50) DEFAULT NULL,
  `cardname` varchar(255) DEFAULT NULL,
  `cardnumber` varchar(50) DEFAULT NULL,
  `expiredate` varchar(20) DEFAULT NULL,
  `expmonth` varchar(10) DEFAULT NULL,
  `expyear` varchar(10) DEFAULT NULL,
  `cvv` varchar(10) DEFAULT NULL,
  `numberaccount` varchar(100) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `ip_address` varchar(100) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `status` varchar(50) DEFAULT 'pending',
  `message` text DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `info_old`
--

INSERT INTO `info_old` (`id`, `orderNumber`, `fullname`, `username`, `email`, `phone`, `address`, `city`, `country`, `zipcode`, `cardname`, `cardnumber`, `expiredate`, `expmonth`, `expyear`, `cvv`, `numberaccount`, `amount`, `ip_address`, `user_agent`, `status`, `message`, `code`, `notes`, `created_at`, `updated_at`) VALUES
(1, '', 'dw dw', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0123 5464 6564', '05/29', NULL, NULL, '200', '100', 200.00, NULL, NULL, 'pending', NULL, '200', NULL, '2026-05-14 13:45:20', '2026-05-14 14:05:33'),
(2, '', 'dw dw', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0123 5464 6564', '05/29', NULL, NULL, '200', '100', 200.00, NULL, NULL, 'pending', NULL, '200', NULL, '2026-05-14 13:49:16', '2026-05-14 14:05:33');

-- --------------------------------------------------------

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int(11) NOT NULL,
  `info_id` int(11) NOT NULL,
  `message` text NOT NULL,
  `type` varchar(50) DEFAULT 'info',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admins`
--
ALTER TABLE `admins`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`);

--
-- Indexes for table `info`
--
ALTER TABLE `info`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_created_at` (`created_at`),
  ADD KEY `idx_order_number` (`orderNumber`),
  ADD KEY `idx_status` (`status`);

--
-- Indexes for table `info_old`
--
ALTER TABLE `info_old`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_created_at` (`created_at`);

--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_messages_info` (`info_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admins`
--
ALTER TABLE `admins`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `info`
--
ALTER TABLE `info`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `info_old`
--
ALTER TABLE `info_old`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `messages`
--
ALTER TABLE `messages`
  ADD CONSTRAINT `fk_messages_info` FOREIGN KEY (`info_id`) REFERENCES `info_old` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
