-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 29, 2025 at 07:15 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.0.30

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

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

--
-- Table structure for table `logs`
--

CREATE TABLE `logs` (
  `id` int(11) NOT NULL,
  `action` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `logs`
--

INSERT INTO `logs` (`id`, `action`, `created_at`) VALUES
(1, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 10:48:10'),
(2, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 10:49:28'),
(3, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 10:50:04'),
(4, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 10:51:50'),
(5, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 10:52:02'),
(6, 'Sort: likes_count DESC, created_at DESC', '2025-10-20 10:57:11'),
(7, 'Sort: likes_count DESC, created_at DESC', '2025-10-20 10:57:38'),
(8, 'Sort: likes_count DESC, created_at DESC', '2025-10-20 10:57:49'),
(9, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 10:58:21'),
(10, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 11:00:13'),
(11, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 11:00:25'),
(12, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 11:00:30'),
(13, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 11:00:50'),
(14, 'Sort: likes_count ASC, created_at ASC', '2025-10-20 11:03:19'),
(15, 'Sort: likes_count ASC, created_at ASC', '2025-10-20 13:15:51'),
(16, 'Sort: likes_count ASC, created_at ASC', '2025-10-20 13:16:43'),
(17, 'Sort: likes_count DESC, created_at ASC', '2025-10-20 13:16:59'),
(18, 'Sort: likes_count DESC, created_at DESC', '2025-10-20 13:17:30'),
(19, 'Sort: likes_count ASC, created_at DESC', '2025-10-20 13:17:43'),
(20, 'Sort: likes_count ASC, created_at ASC', '2025-10-20 14:55:23'),
(21, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 07:54:20'),
(22, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:37:06'),
(23, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:39:50'),
(24, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:39:56'),
(25, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:40:18'),
(26, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:40:25'),
(27, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:41:31'),
(28, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:41:35'),
(29, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:43:23'),
(30, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:43:28'),
(31, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:45:26'),
(32, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:45:40'),
(33, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:46:04'),
(34, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:47:17'),
(35, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:47:39'),
(36, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:48:08'),
(37, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:51:23'),
(38, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:51:40'),
(39, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:54:52'),
(40, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:55:30'),
(41, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 09:57:11'),
(42, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:02:42'),
(43, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:02:46'),
(44, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:03:21'),
(45, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:03:24'),
(46, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:05:28'),
(47, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:05:31'),
(48, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:05:52'),
(49, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:06:25'),
(50, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:06:48'),
(51, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 10:58:54'),
(52, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:01:38'),
(53, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:01:46'),
(54, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:06:41'),
(55, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:07:49'),
(56, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:11:38'),
(57, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:12:02'),
(58, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:12:15'),
(59, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:12:41'),
(60, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:13:22'),
(61, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:16:54'),
(62, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:18:23'),
(63, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:18:26'),
(64, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:19:40'),
(65, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:20:31'),
(66, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:26:12'),
(67, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:29:19'),
(68, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:34:39'),
(69, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:35:42'),
(70, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 11:37:17'),
(71, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 15:13:04'),
(72, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 15:42:20'),
(73, 'Sort: likes_count DESC, created_at DESC', '2025-10-26 16:22:46'),
(74, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 16:44:48'),
(75, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 16:46:58'),
(76, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 16:50:52'),
(77, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:08:09'),
(78, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:12:38'),
(79, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:12:46'),
(80, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:13:53'),
(81, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:15:22'),
(82, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:23:57'),
(83, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:25:06'),
(84, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:28:56'),
(85, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 17:38:23'),
(86, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 18:06:26'),
(87, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 18:13:53'),
(88, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 18:14:16'),
(89, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 18:14:44'),
(90, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-26 18:15:33'),
(91, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 07:12:49'),
(92, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 07:34:34'),
(93, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 07:43:33'),
(94, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 07:49:02'),
(95, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 07:58:01'),
(96, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:15:50'),
(97, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:18:04'),
(98, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:22:08'),
(99, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:22:32'),
(100, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:35:06'),
(101, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:37:38'),
(102, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:39:35'),
(103, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:46:34'),
(104, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:47:56'),
(105, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:54:14'),
(106, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 09:55:55'),
(107, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 11:41:45'),
(108, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 11:51:05'),
(109, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 19:03:05'),
(110, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 19:17:38'),
(111, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-27 19:19:56'),
(112, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-28 09:22:34'),
(113, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-28 09:32:42'),
(114, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-28 09:33:38'),
(115, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-28 09:36:21'),
(116, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-28 09:37:56'),
(117, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-28 16:45:16'),
(118, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-28 16:58:54'),
(119, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 04:45:00'),
(120, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:30:32'),
(121, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:30:52'),
(122, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:31:06'),
(123, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:31:48'),
(124, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:31:59'),
(125, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:32:14'),
(126, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:47:17'),
(127, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:49:09'),
(128, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:49:41'),
(129, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:52:12'),
(130, 'Sort: p.likes_count DESC, p.created_at DESC', '2025-10-29 05:53:03');

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

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `total_price` decimal(10,2) NOT NULL,
  `payment_method` enum('online','cod') DEFAULT 'online',
  `payment_status` enum('pending','paid','failed') DEFAULT 'pending',
  `order_status` enum('processing','shipped','delivered','cancelled') DEFAULT 'processing',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `order_items`
--

CREATE TABLE `order_items` (
  `id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `discount` decimal(5,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `price` decimal(10,2) NOT NULL,
  `discount` int(11) NOT NULL DEFAULT 0,
  `category_id` int(11) DEFAULT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `stock` int(11) DEFAULT 0,
  `material` varchar(100) DEFAULT NULL,
  `dimensions` varchar(100) DEFAULT NULL,
  `weight` decimal(10,2) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `likes_count` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `name`, `description`, `price`, `discount`, `category_id`, `image_path`, `stock`, `material`, `dimensions`, `weight`, `created_at`, `updated_at`, `likes_count`) VALUES
(1, 'گلدان سفالی سنتی', 'یک گلدان سفالی دست‌ساز با طرح سنتی ایرانی', 250000.00, 10, 1, 'Capture.PNG', 10, 'سفال', '20x15x15 cm', 1.20, '2025-10-20 06:12:32', '2025-10-26 11:32:47', 5),
(2, 'گلدان سفالی سنتی', 'یک گلدان سفالی دست‌ساز با طرح سنتی ایرانی', 250000.00, 5, 1, 'Capture.PNG', 10, 'سفال', '20x15x15 cm', 1.20, '2025-10-20 06:57:49', '2025-10-26 11:32:53', 15),
(3, 'گلدان سفالی سنتی', 'یک گلدان سفالی دست‌ساز با طرح سنتی ایرانی', 250000.00, 0, 1, NULL, 10, 'سفال', '20x15x15 cm', 1.20, '2025-10-26 18:01:04', '2025-10-26 18:01:04', 0),
(4, 'goldan', 'یک گلدان سفالی دست‌ساز با طرح سنتی ایرانی', 250000.00, 0, 1, 'props.PNG', 10, 'سفال', '20x15x15 cm', 1.20, '2025-10-26 18:12:03', '2025-10-26 18:15:25', 0),
(5, 'goldan', 'یک گلدان سفالی دست‌ساز با طرح سنتی ایرانی', 250000.00, 0, 1, 'photo_2024-12-25_16-14-48.jpg', 10, 'سفال', '20x15x15 cm', 1.20, '2025-10-26 18:13:45', '2025-10-26 18:13:45', 0);

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

--
-- Table structure for table `product_ratings`
--

CREATE TABLE `product_ratings` (
  `id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `rating` tinyint(4) NOT NULL CHECK (`rating` between 1 and 5),
  `comment` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `product_ratings`
--

INSERT INTO `product_ratings` (`id`, `product_id`, `user_id`, `rating`, `comment`, `created_at`) VALUES
(1, 1, 1, 5, NULL, '2025-10-26 16:32:52'),
(2, 1, 2, 4, NULL, '2025-10-26 16:50:50'),
(3, 2, 2, 2, NULL, '2025-10-26 17:07:47'),
(4, 2, 1, 4, NULL, '2025-10-26 17:08:07');

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `site_name` varchar(250) NOT NULL,
  `site_description` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `site_name`, `site_description`) VALUES
(1, 'asiashop', '');

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

--
-- Table structure for table `sliders`
--

CREATE TABLE `sliders` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `discount_code` varchar(100) DEFAULT NULL,
  `discount_value` int(11) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `color` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sliders`
--

INSERT INTO `sliders` (`id`, `title`, `description`, `discount_code`, `discount_value`, `image`, `color`, `created_at`) VALUES
(1, 'تخفیف بزرگ جمعه سیاه', 'فقط امروز تا ۵۰٪ تخفیف روی همه محصولات.', 'BLACK50', 50, 'banner9.png', '#8B5E3C', '2025-10-29 05:05:26');

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

--
-- Table structure for table `stories`
--

CREATE TABLE `stories` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `content_type` enum('image','video','text') NOT NULL,
  `content_url` varchar(255) NOT NULL,
  `caption` varchar(255) DEFAULT NULL,
  `likes_count` int(11) DEFAULT 0,
  `views_count` int(11) DEFAULT 0,
  `status` enum('active','expired','deleted') DEFAULT 'active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `expires_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `stories`
--

INSERT INTO `stories` (`id`, `user_id`, `content_type`, `content_url`, `caption`, `likes_count`, `views_count`, `status`, `created_at`, `expires_at`) VALUES
(3, 1, 'image', 'uploads/story2.jpg', 'یک استوری جدید', 0, 0, 'active', '2025-10-20 14:44:19', '2025-10-21 14:44:19'),
(4, 1, 'image', 'uploads/story2.jpg', '2 استوری جدید', 0, 0, 'active', '2025-10-20 17:37:12', '2025-10-21 17:37:12');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `phone_number` varchar(250) DEFAULT NULL,
  `username` varchar(250) DEFAULT NULL,
  `password` varchar(250) DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT 1,
  `name` varchar(250) DEFAULT NULL,
  `role` int(11) DEFAULT 2 COMMENT '1-admin\r\n2-users',
  `email` varchar(250) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `adress` varchar(250) DEFAULT NULL,
  `avatar` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `phone_number`, `username`, `password`, `status`, `name`, `role`, `email`, `address`, `adress`, `avatar`) VALUES
(1, '09123456789', 'reza', 'e10adc3949ba59abbe56e057f20f883e', 0, 'رضا سنجری', 0, 'reza@example.com', 'تهران', NULL, 'avatar1.png'),
(2, '09936584', 'reza1', 'e10adc3949ba59abbe56e057f20f883e', 0, '2رضا سنجری', 0, 'reza@example.com', 'تهران', NULL, 'avatar1.png'),
(3, NULL, 'reza2', '$2y$10$bsF83QFa2zzFwjR9whkqxuCIfSi35JYw7sNqTccWUm.OCvywt0696', 1, NULL, 2, 'reza@example.com', NULL, NULL, NULL),
(4, NULL, 'reza8', '$2y$10$WHPwMFuNgLsiAmjBNUcd2.bmMWyZbfJz/VCixyNYrV586MY4CblS6', 1, NULL, 2, 'reza@exampl1e.com', NULL, NULL, NULL),
(5, NULL, 'reza9', '$2y$10$CuI1iYZlSpM.Fd6uNmYma.dKu7wXofXGpT8/4gkQaICwy.DCrnXg.', 1, NULL, 2, 'reza@exampl1e1.com', NULL, NULL, NULL),
(6, NULL, 'reza-sanjari', '$2y$10$NMxeHxq15bkKp.fEzs6FU.k6XK3aYWrzUz3IPrZ6hV/cgXx9mky4.', 1, NULL, 2, 'zaravand@gmail.com', NULL, NULL, NULL),
(7, NULL, 'zaravand', '$2y$10$/VCPEWeu6sPNeCZSKAv08e/BXp1CaolQk9Fc/GOAIDhOjzcAHGj8C', 1, NULL, 2, 'zaravand2@gmail.com', NULL, NULL, NULL),
(8, NULL, 'sanjari', '$2y$10$emi/0XAQK1z.wv1E0GAJNuZNqpokirxsH0OeGLxBhNvSbCa5.l5mO', 1, NULL, 2, 'sanjari@gmail.com', NULL, NULL, NULL),
(9, NULL, 'sanjari1', '$2y$10$KeLOafLbhHlmF/JVvYq9cupyYwsEPGQj.vhhOAmyaqvQkFWHnix/y', 1, NULL, 2, 'sanjari1@gmail.com', NULL, NULL, NULL),
(10, NULL, 'sanjari3', '$2y$10$pUhYvn4hkVafd5r0Q9lUZ.K8onhHrx5CGOQCXY7YxJ8yKKRHpd9JC', 1, NULL, 2, 'sanjari3@gmail.com', NULL, NULL, NULL);

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `order_items`
--
ALTER TABLE `order_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `product_id` (`product_id`);

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

--
-- Indexes for table `product_ratings`
--
ALTER TABLE `product_ratings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `product_id` (`product_id`),
  ADD KEY `user_id` (`user_id`);

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

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

--
-- Indexes for table `stories`
--
ALTER TABLE `stories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
  ADD CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `order_items`
--
ALTER TABLE `order_items`
  ADD CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`),
  ADD CONSTRAINT `order_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);

--
-- Constraints for table `product_ratings`
--
ALTER TABLE `product_ratings`
  ADD CONSTRAINT `product_ratings_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `product_ratings_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `stories`
--
ALTER TABLE `stories`
  ADD CONSTRAINT `stories_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`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 */;
