-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 22, 2026 at 06:33 AM
-- Server version: 10.6.24-MariaDB-cll-lve
-- PHP Version: 8.4.16

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

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

--
-- Table structure for table `commission_levels`
--

CREATE TABLE `commission_levels` (
  `id` int(11) NOT NULL,
  `country_id` int(11) NOT NULL COMMENT 'FK to countries table',
  `level` int(11) NOT NULL COMMENT 'Level number: 1, 2, 3, 4, 5',
  `commission` decimal(10,2) NOT NULL COMMENT 'Fixed commission amount in local currency',
  `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 `commission_levels`
--

INSERT INTO `commission_levels` (`id`, `country_id`, `level`, `commission`, `created_at`, `updated_at`) VALUES
(4, 1, 1, 70.00, '2026-01-20 19:52:13', '2026-01-20 19:52:13'),
(5, 1, 2, 10.00, '2026-01-20 19:52:13', '2026-01-20 19:52:13'),
(6, 1, 3, 2.00, '2026-01-20 19:52:13', '2026-01-20 19:52:13');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `commission_levels`
--
ALTER TABLE `commission_levels`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `country_level` (`country_id`,`level`),
  ADD KEY `idx_country` (`country_id`),
  ADD KEY `idx_level` (`level`);

--
-- AUTO_INCREMENT for dumped tables
--

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `commission_levels`
--
ALTER TABLE `commission_levels`
  ADD CONSTRAINT `fk_commission_country` FOREIGN KEY (`country_id`) REFERENCES `countries` (`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 */;
