-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: 24 مارس 2026 الساعة 06:48
-- إصدار الخادم: 10.11.14-MariaDB
-- PHP Version: 8.3.14

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

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

--
-- بنية الجدول `services`
--

CREATE TABLE `services` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `service_code` varchar(10) DEFAULT NULL,
  `name` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`name`)),
  `service_category_id` bigint(20) UNSIGNED NOT NULL,
  `service_type_id` bigint(20) UNSIGNED NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `duration_value` int(10) UNSIGNED NOT NULL,
  `duration_unit` enum('days','months','years') NOT NULL,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `notes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`notes`)),
  `settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings`)),
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- إرجاع أو استيراد بيانات الجدول `services`
--

INSERT INTO `services` (`id`, `service_code`, `name`, `service_category_id`, `service_type_id`, `price`, `duration_value`, `duration_unit`, `start_time`, `end_time`, `notes`, `settings`, `active`, `created_at`, `updated_at`) VALUES
(1, '1001', '{\"ar\":\"اشتراك نصف سنوي\",\"en\":\"Subscription 6Months\"}', 1, 1, 3999.00, 6, 'months', '00:00:00', '23:59:00', '{\"en\":null}', '{\"pause\":{\"enabled\":\"1\",\"max_times\":\"4\",\"max_duration_value\":\"30\",\"max_duration_unit\":\"days\"},\"transfer\":{\"enabled\":\"1\",\"min_duration_value\":\"3\",\"min_duration_unit\":\"days\",\"fee\":\"30\"}}', 1, '2026-01-21 02:14:49', '2026-03-19 17:28:56'),
(2, '1002', '{\"ar\":\"اشتراك سنوي\",\"en\":\"Subscriptions 12Months\"}', 1, 1, 5999.00, 12, 'months', '00:00:00', '23:59:00', '{\"en\":null}', '{\"pause\":{\"enabled\":\"1\",\"max_times\":\"6\",\"max_duration_value\":\"60\",\"max_duration_unit\":\"days\"},\"transfer\":{\"enabled\":\"1\",\"min_duration_value\":\"10\",\"min_duration_unit\":\"days\",\"fee\":\"30\"}}', 1, '2026-01-21 02:17:08', '2026-03-10 04:19:40'),
(3, '1003', '{\"ar\":\"اشتراك سنتين\",\"en\":\"Subscriptions 24Months\"}', 1, 1, 13000.00, 24, 'months', '00:00:00', '23:59:00', '{\"en\":null}', '{\"pause\":{\"enabled\":\"1\",\"max_times\":\"10\",\"max_duration_value\":\"120\",\"max_duration_unit\":\"days\"}}', 1, '2026-01-21 02:48:25', '2026-01-21 02:48:25'),
(4, '1004', '{\"ar\":\"اشتراك يومي\",\"en\":\"subscription Daily\"}', 1, 3, 130.00, 1, 'days', '00:00:00', '11:59:00', '{\"en\":null}', NULL, 1, '2026-01-21 05:24:32', '2026-01-24 13:01:50'),
(5, '1005', '{\"ar\":\"اشتراك 3 شهور\",\"en\":\"اشتراك 3 شهور\"}', 1, 1, 0.00, 90, 'days', '00:00:00', '11:59:00', '{\"en\":null}', '{\"refund\":{\"enabled\":\"1\",\"method\":\"money\"}}', 1, '2026-02-02 09:51:53', '2026-03-23 04:51:35'),
(6, '1006', '{\"ar\":\"اشتراك سنه ونص\",\"en\":\"اشتراك سنه ونص\"}', 1, 1, 6000.00, 18, 'months', NULL, NULL, '{\"en\":null}', NULL, 1, '2026-02-11 10:42:06', '2026-02-11 10:42:06'),
(7, '1007', '{\"ar\":\"اشتراك شهر\",\"en\":\"اشتراك شهر\"}', 1, 1, 870.00, 30, 'days', NULL, NULL, '{\"en\":null}', NULL, 1, '2026-02-16 13:14:01', '2026-02-16 13:14:01'),
(8, '1008', '{\"ar\":\"اشتراك تدريب شخصي 8 حصص\",\"en\":\"Personal Training Subscription For 8 Sessions\"}', 2, 1, 1380.00, 1, 'months', '00:00:00', '23:59:00', '{\"en\":null}', '{\"refund\":{\"enabled\":\"1\",\"method\":\"money\"}}', 1, '2026-03-23 04:50:35', '2026-03-23 04:50:35');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `services`
--
ALTER TABLE `services`
  ADD PRIMARY KEY (`id`),
  ADD KEY `services_service_category_id_foreign` (`service_category_id`),
  ADD KEY `services_service_type_id_foreign` (`service_type_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `services`
--
ALTER TABLE `services`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
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 */;
