-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 01, 2025 at 02:27 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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: `indi-vouch-new`
--

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

--
-- Table structure for table `binary_tree`
--

CREATE TABLE `binary_tree` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `upline_id` bigint(20) NOT NULL,
  `left_id` bigint(20) NOT NULL,
  `right_id` bigint(20) NOT NULL,
  `left_m_count` int(11) NOT NULL,
  `right_m_count` int(11) NOT NULL,
  `left_points` int(11) NOT NULL,
  `right_points` int(11) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp(),
  `status` tinyint(4) NOT NULL DEFAULT 5
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `f_payment`
--

CREATE TABLE `f_payment` (
  `id` bigint(20) NOT NULL,
  `date1` date NOT NULL,
  `date2` datetime NOT NULL,
  `amount` float NOT NULL DEFAULT 0,
  `fromID` int(11) NOT NULL,
  `fromName` varchar(150) NOT NULL,
  `toID` int(11) NOT NULL,
  `toName` varchar(150) NOT NULL,
  `details` varchar(250) NOT NULL DEFAULT '',
  `status` varchar(20) NOT NULL,
  `type1` varchar(50) NOT NULL,
  `note1` varchar(150) NOT NULL DEFAULT '0',
  `note2` varchar(500) NOT NULL DEFAULT '0' COMMENT 'ORDER_NO',
  `note3` varchar(150) NOT NULL DEFAULT '0',
  `note4` varchar(150) NOT NULL DEFAULT '0',
  `schoolid` int(11) NOT NULL DEFAULT 0 COMMENT '1: withdrawal, 0 :Income',
  `userid` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `generation`
--

CREATE TABLE `generation` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `sponcer_id` bigint(20) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `payment`
--

CREATE TABLE `payment` (
  `id` bigint(20) NOT NULL,
  `date1` date NOT NULL,
  `date2` datetime NOT NULL,
  `amount` float NOT NULL DEFAULT 0,
  `fromID` int(11) NOT NULL,
  `fromName` varchar(150) NOT NULL,
  `toID` int(11) NOT NULL,
  `toName` varchar(150) NOT NULL,
  `details` varchar(250) NOT NULL DEFAULT '',
  `status` varchar(20) NOT NULL,
  `type1` varchar(50) NOT NULL,
  `note1` varchar(150) NOT NULL DEFAULT '0',
  `note2` varchar(500) NOT NULL DEFAULT '0' COMMENT 'ORDER_NO',
  `note3` varchar(150) NOT NULL DEFAULT '0',
  `note4` varchar(150) NOT NULL DEFAULT '0',
  `schoolid` int(11) NOT NULL DEFAULT 0 COMMENT '1: withdrawal, 0 :Income',
  `userid` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `setting`
--

CREATE TABLE `setting` (
  `id` int(11) NOT NULL,
  `flag_name` varchar(150) NOT NULL,
  `flag_value` varchar(250) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `stock`
--

CREATE TABLE `stock` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `voucher_packages_id` int(11) NOT NULL,
  `amount` float NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `upi_transection_details`
--

CREATE TABLE `upi_transection_details` (
  `upi_id` int(11) NOT NULL,
  `payment_type` varchar(150) NOT NULL DEFAULT '',
  `payment_id` varchar(50) NOT NULL DEFAULT '',
  `create_date` datetime NOT NULL DEFAULT current_timestamp(),
  `amount` float NOT NULL,
  `p_info` varchar(100) NOT NULL DEFAULT '',
  `customer_name` varchar(150) NOT NULL DEFAULT '',
  `customer_email` varchar(150) NOT NULL DEFAULT '',
  `customer_mobile` varchar(50) NOT NULL DEFAULT '',
  `redirect_url` varchar(255) NOT NULL DEFAULT '',
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `responce` text NOT NULL DEFAULT '',
  `created_url` text NOT NULL DEFAULT '',
  `updated_at` datetime NOT NULL DEFAULT current_timestamp(),
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `id` bigint(20) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `name` varchar(150) NOT NULL,
  `mobile` varchar(10) NOT NULL,
  `email` varchar(100) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(150) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `user_status`
--

CREATE TABLE `user_status` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `voucher_packages`
--

CREATE TABLE `voucher_packages` (
  `id` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `amount` float NOT NULL,
  `cop_amount` float NOT NULL,
  `cop_count` int(11) NOT NULL,
  `day_delay` int(11) NOT NULL,
  `return_total` float NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Indexes for dumped tables
--

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

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

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

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

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

--
-- Indexes for table `upi_transection_details`
--
ALTER TABLE `upi_transection_details`
  ADD PRIMARY KEY (`upi_id`);

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `binary_tree`
--
ALTER TABLE `binary_tree`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `generation`
--
ALTER TABLE `generation`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payment`
--
ALTER TABLE `payment`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `stock`
--
ALTER TABLE `stock`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `upi_transection_details`
--
ALTER TABLE `upi_transection_details`
  MODIFY `upi_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `voucher_packages`
--
ALTER TABLE `voucher_packages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
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 */;
