-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 17, 2023 at 02:42 PM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 7.4.33

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

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

--
-- Table structure for table `cart`
--

CREATE TABLE `cart` (
  `id` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `pack_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `city`
--

CREATE TABLE `city` (
  `id` int(11) NOT NULL,
  `state_id` int(11) NOT NULL,
  `name` varchar(20) NOT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `city`
--

INSERT INTO `city` (`id`, `state_id`, `name`, `is_active`) VALUES
(1, 1, 'Chennai', 1),
(2, 2, 'Cochin', 1);

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

--
-- Table structure for table `country`
--

CREATE TABLE `country` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `country`
--

INSERT INTO `country` (`id`, `name`, `is_active`) VALUES
(1, 'India', 1),
(2, 'Canada', 1);

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

--
-- Table structure for table `email_template`
--

CREATE TABLE `email_template` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `type` int(10) NOT NULL,
  `text` mediumtext NOT NULL,
  `html` mediumtext NOT NULL,
  `to` varchar(255) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `email_template`
--

INSERT INTO `email_template` (`id`, `name`, `type`, `text`, `html`, `to`, `subject`, `is_active`, `created_at`, `updated_at`, `created_by`, `updated_by`) VALUES
(6, 'Member Registration Template', 1, 'Hi %name% , Please confirm your email address by clicking the link below.', '</p>\n<p style=\"margin-bottom: 1rem;\">Hi %name% , \nPlease confirm your email address by clicking the link\n below.\n</p>', 'gowtham.manavalan.la@gmail.com,suseendhiran1999@gmail.com', 'demo', 1, '2023-05-17 06:40:10', '0000-00-00 00:00:00', 0, 0),
(10, 'User Registration Template', 2, 'Please login by clicking the link below.', '<p><p>Please login by clicking the link below.</p></p>', 'suseendhiran1999@gmail.com', 'Demo', 1, '2023-05-17 06:55:57', '0000-00-00 00:00:00', 0, 0),
(12, 'OTP Template', 3, 'Please use the verification code below on the Golf Evolution Website.', '<p><p></p><p>Please use the verification code below on the Golf Evolution Website.</p></p>', 'suseendhiran1999@gmail.com', 'Demo', 1, '2023-05-17 11:57:55', '0000-00-00 00:00:00', 0, 0),
(14, 'Change Password Verification Template', 4, 'Hello %name% ! , Your password changed successfully...', '<p>Hello %name% ! , Your password changed successfully...</p>', 'suseendhiran1999@gmail.com', 'Demo', 1, '2023-05-17 12:02:14', '0000-00-00 00:00:00', 0, 0);

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

--
-- Table structure for table `email_template_variables`
--

CREATE TABLE `email_template_variables` (
  `id` int(11) NOT NULL,
  `type` int(10) NOT NULL,
  `name` varchar(50) NOT NULL,
  `variable_name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `email_template_variables`
--

INSERT INTO `email_template_variables` (`id`, `type`, `name`, `variable_name`) VALUES
(1, 1, 'Member Name', '%name%'),
(3, 2, 'User Name', '%name%'),
(4, 3, 'User Name', '%name%'),
(5, 3, 'OTP', '%otp%'),
(6, 4, 'Name', '%name%');

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

--
-- Table structure for table `member`
--

CREATE TABLE `member` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `email` varchar(50) NOT NULL,
  `is_email_verified` int(11) NOT NULL DEFAULT 0,
  `mobile` varchar(12) NOT NULL,
  `address` varchar(50) NOT NULL,
  `city` varchar(50) NOT NULL,
  `state` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `pincode` int(10) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(100) NOT NULL,
  `verification_code` int(10) NOT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `member`
--

INSERT INTO `member` (`id`, `name`, `email`, `is_email_verified`, `mobile`, `address`, `city`, `state`, `country`, `pincode`, `username`, `password`, `verification_code`, `is_active`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(4, 'Gowthaman', 'gwm@gmail.com', 1, '9894638731', '1st st', '1', '1', '1', 650001, '', '$2y$10$XJD4E81SQtf7XaHZdCVJa.VA/FL1/4OIsL7ZDR1t7M1QnzQ87jb7K', 0, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(5, 'test', 'test@gmail.com', 0, '9500625731', 'Bank Suruliyappan street', '1', '1', '1', 625528, '', '$2y$10$pa8XhW/xFapidAaFA7Zd1eDZMr4SxBGpHXCaJAh0fYH7ej6Ns3UUC', 0, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(6, 'Jeeva', 'gowtham.manavalan.la@gmail.com', 1, '9500625731', 'Bank Suruliyappan street', '2', '2', '1', 625528, '', '$2y$10$kOboUqGu66RUC2sfUe/1zuMP0u/6QiNieEgCCCOS08RSYhJjnPbt6', 787918, 1, 0, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00');

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

--
-- Table structure for table `member_credits`
--

CREATE TABLE `member_credits` (
  `id` int(11) NOT NULL,
  `member_id` int(11) DEFAULT NULL,
  `package_name` varchar(50) DEFAULT NULL,
  `package_type` varchar(50) DEFAULT NULL,
  `credit_points` int(11) DEFAULT NULL,
  `running_balance` int(11) DEFAULT NULL,
  `used_points` int(11) NOT NULL,
  `expired_points` int(11) DEFAULT NULL,
  `expiring_date` date DEFAULT NULL,
  `cost` int(11) DEFAULT NULL,
  `is_active` int(11) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `member_credits`
--

INSERT INTO `member_credits` (`id`, `member_id`, `package_name`, `package_type`, `credit_points`, `running_balance`, `used_points`, `expired_points`, `expiring_date`, `cost`, `is_active`, `created_at`, `updated_at`) VALUES
(11, 4, 'Evo Pack 2', 'Regular', 40, 0, 40, 0, '2023-06-11', 1000, 1, '2023-05-11 09:28:21', '2023-05-11 09:28:21'),
(12, 4, 'Evo Pack 1', 'Presales', 24, 0, 24, 0, '2023-06-11', 550, 1, '2023-05-11 09:28:22', '2023-05-11 09:28:22'),
(13, 4, 'Evo Pack 2', 'Presales', 48, 30, 18, 0, '2023-06-11', 1000, 1, '2023-05-11 09:33:47', '2023-05-11 09:33:47'),
(14, 4, 'Evo Pack 2', 'Presales', 48, 48, 0, 0, '2023-06-11', 1000, 1, '2023-05-11 09:53:51', '2023-05-11 09:53:51'),
(15, 4, 'Evo Pack 1', 'Presales', 24, 24, 0, 0, '2023-06-11', 550, 1, '2023-05-11 09:53:52', '2023-05-11 09:53:52'),
(16, 4, 'Evo Pack 2', 'Presales', 48, 48, 0, 0, '2023-06-17', 1000, 1, '2023-05-17 10:38:23', '2023-05-17 10:38:23'),
(17, 4, 'Evo Pack 1', 'Presales', 24, 24, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:38:23', '2023-05-17 10:38:23'),
(18, 4, 'Evo Pack 2', 'Regular', 40, 40, 0, 0, '2023-06-17', 1000, 1, '2023-05-17 10:39:10', '2023-05-17 10:39:10'),
(19, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:17', '2023-05-17 10:39:17'),
(20, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(21, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(22, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(23, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(24, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:20', '2023-05-17 10:39:20'),
(25, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(26, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(27, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(28, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(29, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(30, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:21', '2023-05-17 10:39:21'),
(31, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:22', '2023-05-17 10:39:22'),
(32, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:22', '2023-05-17 10:39:22'),
(33, 4, 'Evo Pack 1', 'Regular', 20, 20, 0, 0, '2023-06-17', 550, 1, '2023-05-17 10:39:22', '2023-05-17 10:39:22');

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

--
-- Table structure for table `packages_and_pricing`
--

CREATE TABLE `packages_and_pricing` (
  `id` int(11) NOT NULL,
  `package_name` varchar(50) DEFAULT NULL,
  `package_type` varchar(50) DEFAULT NULL,
  `credit` int(11) DEFAULT NULL,
  `cost` int(11) DEFAULT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `packages_and_pricing`
--

INSERT INTO `packages_and_pricing` (`id`, `package_name`, `package_type`, `credit`, `cost`, `is_active`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(3, 'Evo Pack 1', 'Regular', 20, 550, 1, 1, NULL, '2023-05-08 11:27:10', '2023-05-08 16:57:10'),
(4, 'Evo Pack 2', 'Regular', 40, 1000, 1, 1, NULL, '2023-05-08 11:27:10', '2023-05-08 16:57:10'),
(6, 'Evo Pack 1', 'Presales', 24, 550, 1, NULL, NULL, '2023-05-11 09:12:43', '2023-05-11 14:42:43'),
(7, 'Evo Pack 2', 'Presales', 48, 1000, 1, NULL, NULL, '2023-05-11 09:12:43', '2023-05-11 14:42:43');

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

--
-- Table structure for table `simulator`
--

CREATE TABLE `simulator` (
  `id` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `slot`
--

CREATE TABLE `slot` (
  `id` int(11) NOT NULL,
  `member_id` int(11) NOT NULL,
  `slot_time` time NOT NULL,
  `slot_date` date NOT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1,
  `created_by` int(11) NOT NULL,
  `updated_by` int(11) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `state`
--

CREATE TABLE `state` (
  `id` int(11) NOT NULL,
  `country_id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `is_active` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `state`
--

INSERT INTO `state` (`id`, `country_id`, `name`, `is_active`) VALUES
(1, 1, 'Tamilnadu', 1),
(2, 1, 'Kerala', 1);

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

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

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `role` varchar(50) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `profile` varchar(50) NOT NULL,
  `email` varchar(155) DEFAULT NULL,
  `address` varchar(255) NOT NULL,
  `city` varchar(50) NOT NULL,
  `state` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `pincode` int(10) NOT NULL,
  `mobile` varchar(12) DEFAULT NULL,
  `is_active` int(11) DEFAULT 1,
  `user_name` varchar(100) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `updated_by` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `users` (`id`, `role`, `name`, `profile`, `email`, `address`, `city`, `state`, `country`, `pincode`, `mobile`, `is_active`, `user_name`, `password`, `created_by`, `updated_by`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'Admin', 'profile.jpg', 'admin@gmail.com', '1st street', '1', '1', '1', 656787, '986668877', 1, 'admin@gmail.com', '$2y$10$IEWpmjmJFPrI4ww/vcqeHeu5uVyChqmA333iiK0glDjZAvV34gjWa', 0, NULL, '2023-05-03 16:30:22', '2023-05-03 16:30:22'),
(2, 'Admin', 'Gowtham', '', 'gwm@gmail.com', '131 ', '1', '1', '1', 652500, '6565656565', 0, NULL, NULL, NULL, NULL, '2023-05-06 12:06:31', '2023-05-06 12:06:31'),
(4, 'Admin', 'Gowtham 0045', '', 'gowtham.manavalan.la@gmail.com', '', '1', '1', '1', 0, '09500625731', 1, NULL, '$2y$10$UHEtYAei5PoAteL6b0Fm/e7x94Kr8QmQyFHFcW6wq35juNqKvhyN2', NULL, NULL, '2023-05-06 16:24:23', '2023-05-06 16:24:23'),
(5, 'Coach', 'Susee', '', 'suss@gmail.com', 'Bank Suruliyappan street', '1', '1', '1', 625528, '9500625731', 1, NULL, '$2y$10$lNtNgQXFNWCYwyGwMUaYmOpE1MuLUShNvtl9hf5CAf5VEJRyDxDwa', NULL, NULL, '2023-05-08 13:02:43', '2023-05-08 13:02:43');

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

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

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