-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 17, 2025 at 04:13 PM
-- Server version: 10.6.22-MariaDB-cll-lve
-- PHP Version: 8.4.11

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: `bectelec_fluterupdate`
--

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

--
-- Table structure for table `airtime_requests`
--

CREATE TABLE `airtime_requests` (
  `id` int(11) NOT NULL,
  `user_id` varchar(255) DEFAULT NULL,
  `network` varchar(50) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `receiving_amount` decimal(10,2) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `bank_name` varchar(100) DEFAULT NULL,
  `account_name` varchar(100) DEFAULT NULL,
  `account_number` varchar(20) DEFAULT NULL,
  `request_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `airtime_requests`
--

INSERT INTO `airtime_requests` (`id`, `user_id`, `network`, `amount`, `receiving_amount`, `phone`, `bank_name`, `account_name`, `account_number`, `request_date`) VALUES
(1, '0', 'Airtel', 400.00, 320.00, '07034398627', 'Opay', 'Gamaliel Chigekwu', '7034398627', '2025-01-25 03:54:56'),
(2, '0', 'MTN', 400.00, 320.00, '07034398627', 'Opay', 'Gamaliel Chigekwu', '7034398627', '2025-01-25 03:56:34');

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

--
-- Table structure for table `coupons`
--

CREATE TABLE `coupons` (
  `id` int(11) NOT NULL,
  `code` varchar(50) NOT NULL,
  `description` text NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `expiry_date` datetime NOT NULL,
  `claim_limit` int(11) NOT NULL,
  `claimed_count` int(11) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `coupons`
--

INSERT INTO `coupons` (`id`, `code`, `description`, `amount`, `expiry_date`, `claim_limit`, `claimed_count`, `created_at`) VALUES
(1, 'Lucifer', '500 claim', 500.00, '2025-02-18 01:35:52', 1, 1, '2025-02-17 00:36:42');

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

--
-- Table structure for table `coupon_claims`
--

CREATE TABLE `coupon_claims` (
  `id` int(11) NOT NULL,
  `user_id` varchar(100) NOT NULL,
  `coupon_id` int(11) NOT NULL,
  `claimed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `coupon_claims`
--

INSERT INTO `coupon_claims` (`id`, `user_id`, `coupon_id`, `claimed_at`) VALUES
(1, 'BF19VI08UL', 1, '2025-02-17 00:38:16');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `airtime_requests`
--
ALTER TABLE `airtime_requests`
  ADD PRIMARY KEY (`id`);

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

--
-- Indexes for table `coupon_claims`
--
ALTER TABLE `coupon_claims`
  ADD PRIMARY KEY (`id`),
  ADD KEY `coupon_id` (`coupon_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `coupon_claims`
--
ALTER TABLE `coupon_claims`
  ADD CONSTRAINT `coupon_claims_ibfk_1` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`);
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 */;
