-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `wamsgapi_pan`
--

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

--
-- Table structure for table `apis_deatils`
--

CREATE TABLE `apis_deatils` (
  `api_id` int(11) NOT NULL,
  `api_type` enum('Recharge') NOT NULL,
  `api_name` varchar(255) DEFAULT NULL,
  `api_username` varchar(255) DEFAULT NULL,
  `api_password` varchar(255) DEFAULT NULL,
  `api_key` varchar(255) DEFAULT NULL,
  `recharge_url` longtext DEFAULT NULL,
  `recharge_method` enum('GET','POST','BODY','') DEFAULT NULL,
  `recharge_parameter` longtext DEFAULT NULL,
  `recharge_response_type` enum('JSON','XML','TEXT','') NOT NULL,
  `separate` varchar(10) DEFAULT NULL,
  `recharge_response` longtext DEFAULT NULL,
  `status_url` longtext DEFAULT NULL,
  `status_method` enum('GET','POST','BODY','') DEFAULT NULL,
  `status_parameter` longtext DEFAULT NULL,
  `status_response_type` enum('JSON','XML','TEXT','') NOT NULL,
  `status_response` longtext DEFAULT NULL,
  `dispute_url` longtext DEFAULT NULL,
  `dispute_method` enum('GET','POST','BODY','') DEFAULT NULL,
  `dispute_parameter` longtext DEFAULT NULL,
  `dispute_response_type` enum('JSON','XML','TEXT','') DEFAULT NULL,
  `dispute_response` longtext DEFAULT NULL,
  `callback_url` longtext DEFAULT NULL,
  `callback_method` enum('GET','POST','BODY','') DEFAULT NULL,
  `callback_parameter` longtext DEFAULT NULL,
  `callback_response_type` enum('JSON','XML','TEXT','') NOT NULL,
  `callback_response` longtext DEFAULT NULL,
  `is_active` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `apis_deatils`
--

INSERT INTO `apis_deatils` (`api_id`, `api_type`, `api_name`, `api_username`, `api_password`, `api_key`, `recharge_url`, `recharge_method`, `recharge_parameter`, `recharge_response_type`, `separate`, `recharge_response`, `status_url`, `status_method`, `status_parameter`, `status_response_type`, `status_response`, `dispute_url`, `dispute_method`, `dispute_parameter`, `dispute_response_type`, `dispute_response`, `callback_url`, `callback_method`, `callback_parameter`, `callback_response_type`, `callback_response`, `is_active`) VALUES
(1, 'Recharge', 'Flowzy App', '9754515998', '9035285143', 'Cg31giDo6oh5AU9oVQhfKjbriMc79p', 'https://www.flowzy.app/webservices/api/recharge', 'GET', '{\"Api_Key\":\"api_token\",\"Username\":\"username\",\"Password\":\"\",\"Mobile\":\"number\",\"Operator\":\"operator\",\"Amount\":\"amount\",\"OrderID\":\"ref_id\",\"Optional1\":\"NA\",\"Optional2\":\"NA\",\"Optional3\":\"NA\",\"Optional4\":\"NA\",\"Optional5\":\"NA\",\"Optional6\":\"NA\"}', 'JSON', '', '{\"key\":{\"Status\":\"status\",\"OrderID\":\"agentid\",\"OperatorID\":\"opt_id\",\"TxnID\":\"txn_id\",\"Remark\":\"message\",\"ParentKey\":\"\"},\"value\":{\"Success\":\"Success\",\"Pending\":\"Pending\",\"Failed\":\"Failure\",\"Refund\":\"Error\"}}', 'https://www.flowzy.app/webservices/api/statusByRefId', 'GET', '{\"Api_Key\":\"api_token\",\"Username\":\"username\",\"Password\":\"\",\"Mobile\":\"\",\"Operator\":\"\",\"Amount\":\"\",\"OrderID\":\"ref_id\",\"Optional1\":\"\",\"Optional2\":\"\",\"Optional3\":\"\",\"Optional4\":\"\",\"Optional5\":\"\",\"Optional6\":\"\"}', 'JSON', '{\"key\":{\"Status\":\"status\",\"OrderID\":\"ref_id\",\"OperatorID\":\"opt_id\",\"TxnID\":\"txn_id\",\"Remark\":\"message\",\"ParentKey\":\"\"},\"value\":{\"Success\":\"Success\",\"Pending\":\"Pending\",\"Failed\":\"Failure\",\"Refund\":\"Refunded\"}}', 'https://www.flowzy.app/webservices/api/complain', 'GET', '{\"Api_Key\":\"api_token\",\"Username\":\"username\",\"Password\":\"\",\"Mobile\":\"\",\"Operator\":\"\",\"Amount\":\"\",\"OrderID\":\"\",\"Optional1\":\"txn_id\",\"Optional2\":\"reason\",\"Optional3\":\"\",\"Optional4\":\"\",\"Optional5\":\"\",\"Optional6\":\"Format=1&\"}', 'JSON', '{\"key\":{\"Status\":\"status\",\"OrderID\":\"\",\"OperatorID\":\"complain_id\",\"TxnID\":\"complain_id\",\"Remark\":\"message\",\"ParentKey\":\"\"},\"value\":{\"Success\":\"Accepted\",\"Pending\":\"Pending\",\"Failed\":\"Failure\",\"Refund\":\"Refunded\"}}', 'https://fast2pan.com/callback/api/1', 'GET', '{\"key\":{\"Status\":\"status\",\"OrderID\":\"refId\",\"OperatorID\":\"operatorId\",\"TxnID\":\"txnId\",\"Remark\":\"number\"},\"value\":{\"Success\":\"Success\",\"Pending\":\"Pending\",\"Failed\":\"Failure\",\"Refund\":\"Refunded\"}}', 'JSON', '', 1),
(4, 'Recharge', 'Pos Mitra', '99', '', 'ff0f9bf099543d74e78112c106257954', 'https://posmitra.com/API/TransactionAPI', 'GET', '{\"Api_Key\":\"Token\",\"Username\":\"UserID\",\"Password\":\"\",\"Mobile\":\"Account\",\"Operator\":\"SPKey\",\"Amount\":\"Amount\",\"OrderID\":\"APIRequestID\",\"Optional1\":\"NA\",\"Optional2\":\"NA\",\"Optional3\":\"NA\",\"Optional4\":\"NA\",\"Optional5\":\"NA\",\"Optional6\":\"OutletID=12345&Pincode=743329&GEOCode=23.8530,87.9727&Format=1&\"}', 'JSON', '', '{\"key\":{\"Status\":\"status\",\"OrderID\":\"agentid\",\"OperatorID\":\"opid\",\"TxnID\":\"rpid\",\"Remark\":\"msg\",\"ParentKey\":\"\"},\"value\":{\"Success\":\"2\",\"Pending\":\"1\",\"Failed\":\"3\",\"Refund\":\"4\"}}', 'https://posmitra.com/API/StatusCheck', 'GET', '{\"Api_Key\":\"Token\",\"Username\":\"UserID\",\"Password\":\"\",\"Mobile\":\"\",\"Operator\":\"\",\"Amount\":\"\",\"OrderID\":\"agentid\",\"Optional1\":\"\",\"Optional2\":\"\",\"Optional3\":\"\",\"Optional4\":\"\",\"Optional5\":\"\",\"Optional6\":\"\"}', 'JSON', '{\"key\":{\"Status\":\"status\",\"OrderID\":\"agentid\",\"OperatorID\":\"opid\",\"TxnID\":\"rpid\",\"Remark\":\"msg\",\"ParentKey\":\"\"},\"value\":{\"Success\":\"2\",\"Pending\":\"1\",\"Failed\":\"3\",\"Refund\":\"4\"}}', 'https://posmitra.com/API/RefundRequest', 'GET', '{\"Api_Key\":\"Token\",\"Username\":\"UserID\",\"Password\":\"\",\"Mobile\":\"\",\"Operator\":\"\",\"Amount\":\"\",\"OrderID\":\"\",\"Optional1\":\"RPID\",\"Optional2\":\"\",\"Optional3\":\"\",\"Optional4\":\"\",\"Optional5\":\"\",\"Optional6\":\"Format=1&\"}', 'JSON', '{\"key\":{\"Status\":\"status\",\"OrderID\":\"\",\"OperatorID\":\"\",\"TxnID\":\"\",\"Remark\":\"msg\",\"ParentKey\":\"\"},\"value\":{\"Success\":\"2\",\"Pending\":\"1\",\"Failed\":\"3\",\"Refund\":\"4\"}}', 'https://fast2pan.com/callback/api/4', 'GET', '{\"key\":{\"Status\":\"STATUS\",\"OrderID\":\"AGENTID\",\"OperatorID\":\"LIVEID\",\"TxnID\":\"TRANID\",\"Remark\":\"\"},\"value\":{\"Success\":\"2\",\"Pending\":\"1\",\"Failed\":\"3\",\"Refund\":\"4\"}}', 'JSON', NULL, 1);

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

--
-- Table structure for table `api_operators`
--

CREATE TABLE `api_operators` (
  `id` int(11) NOT NULL,
  `api_id` int(11) DEFAULT NULL,
  `api_name` varchar(255) DEFAULT NULL,
  `operator_id` int(11) DEFAULT NULL,
  `api_operator_id` varchar(100) DEFAULT NULL,
  `api_operator_name` varchar(255) DEFAULT NULL,
  `is_active` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `api_operators`
--

INSERT INTO `api_operators` (`id`, `api_id`, `api_name`, `operator_id`, `api_operator_id`, `api_operator_name`, `is_active`) VALUES
(1, 1, 'Flowzy App', 1, 'AT', 'Airtel', 1),
(2, 1, 'Flowzy App', 2, 'JIO', 'Jio', 1),
(3, 1, 'Flowzy App', 3, 'VI', 'VI', 1),
(4, 1, 'Flowzy App', 4, 'BT', 'BSNL Topup', 1),
(5, 1, 'Flowzy App', 5, 'BSP', 'BSNL Special', 1),
(6, 1, 'Flowzy App', 6, 'ATDTH', 'Airtel DTH', 1),
(7, 1, 'Flowzy App', 7, 'DISHTV', 'Dish TV', 1),
(8, 1, 'Flowzy App', 8, 'SUNDTH', 'Sun Direct', 1),
(9, 1, 'Flowzy App', 9, 'TATASKY', 'Tata Sky', 1),
(10, 1, 'Flowzy App', 10, 'VDDTH', 'Videocon', 1),
(11, 1, 'Flowzy App', 11, 'GPS', 'Google Play', 1),
(23, 3, 'SafiyaPay', 1, '1', 'Airtel', 1),
(24, 3, 'SafiyaPay', 2, '2', 'Jio', 1),
(25, 3, 'SafiyaPay', 3, '3', 'VI', 1),
(26, 3, 'SafiyaPay', 4, '4', 'BSNL Topup', 1),
(27, 3, 'SafiyaPay', 5, '5', 'BSNL Special', 1),
(28, 3, 'SafiyaPay', 6, '6', 'Airtel DTH', 1),
(29, 3, 'SafiyaPay', 7, '7', 'Dish TV', 1),
(30, 3, 'SafiyaPay', 8, '8', 'Sun Direct', 1),
(31, 3, 'SafiyaPay', 9, '9', 'Tata Sky', 1),
(32, 3, 'SafiyaPay', 10, '10', 'Videocon', 1),
(33, 3, 'SafiyaPay', 11, '13', 'Google Play', 1),
(34, 4, 'Pos Mitra', 1, '2', 'Airtel', 1),
(35, 4, 'Pos Mitra', 2, '116', 'Jio', 1),
(36, 4, 'Pos Mitra', 3, '1', 'VI', 1),
(37, 4, 'Pos Mitra', 4, '4', 'BSNL Topup', 1),
(38, 4, 'Pos Mitra', 5, '5', 'BSNL Special', 1),
(39, 4, 'Pos Mitra', 6, '51', 'Airtel DTH', 1),
(40, 4, 'Pos Mitra', 7, '53', 'Dish TV', 1),
(41, 4, 'Pos Mitra', 8, '54', 'Sun Direct', 1),
(42, 4, 'Pos Mitra', 9, '55', 'Tata Sky', 1),
(43, 4, 'Pos Mitra', 10, '56', 'Videocon', 1),
(44, 4, 'Pos Mitra', 11, '7501', 'Google Play', 1);

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

--
-- Table structure for table `bankdetails`
--

CREATE TABLE `bankdetails` (
  `id` bigint(20) NOT NULL,
  `site_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `username` varchar(255) NOT NULL,
  `bankname` varchar(255) NOT NULL,
  `accountname` varchar(255) NOT NULL,
  `accountnumber` varchar(255) NOT NULL,
  `ifsccode` varchar(255) NOT NULL,
  `remark` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `complaints`
--

CREATE TABLE `complaints` (
  `complaint_id` bigint(20) NOT NULL,
  `site_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `username` varchar(255) NOT NULL,
  `complaint_type` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `remark` text NOT NULL,
  `date_time` datetime DEFAULT current_timestamp(),
  `status` enum('Open','Close','') DEFAULT 'Open'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `importantlink`
--

CREATE TABLE `importantlink` (
  `id` bigint(20) NOT NULL,
  `site_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `name` text NOT NULL,
  `url` longtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `marginslab`
--

CREATE TABLE `marginslab` (
  `plan_id` bigint(20) NOT NULL,
  `site_id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `plan_name` varchar(255) NOT NULL,
  `username` bigint(20) NOT NULL,
  `airtel` varchar(100) NOT NULL DEFAULT '1',
  `jio` varchar(100) NOT NULL DEFAULT '1',
  `vi` varchar(100) NOT NULL DEFAULT '1',
  `bsnl_topup` varchar(100) NOT NULL DEFAULT '1',
  `bsnl_special` varchar(100) NOT NULL DEFAULT '1',
  `google_play` varchar(100) NOT NULL DEFAULT '0',
  `airtel_dth` varchar(100) NOT NULL DEFAULT '1',
  `dish_tv` varchar(100) NOT NULL DEFAULT '1',
  `sun_direct` varchar(100) NOT NULL DEFAULT '1',
  `tata_sky` varchar(100) NOT NULL DEFAULT '1',
  `videocon` varchar(100) NOT NULL DEFAULT '1',
  `p_uti` varchar(100) NOT NULL DEFAULT '107',
  `e_uti` varchar(100) NOT NULL DEFAULT '72',
  `p_nsdl` varchar(100) NOT NULL DEFAULT '107',
  `e_nsdl` varchar(100) NOT NULL DEFAULT '72',
  `revamp_uti` varchar(50) NOT NULL DEFAULT '107',
  `pan_find` varchar(100) NOT NULL DEFAULT '100',
  `status` enum('Active','InActive','') NOT NULL DEFAULT 'InActive'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `marginslab`
--

INSERT INTO `marginslab` (`plan_id`, `site_id`, `user_id`, `plan_name`, `username`, `airtel`, `jio`, `vi`, `bsnl_topup`, `bsnl_special`, `google_play`, `airtel_dth`, `dish_tv`, `sun_direct`, `tata_sky`, `videocon`, `p_uti`, `e_uti`, `p_nsdl`, `e_nsdl`, `revamp_uti`, `pan_find`, `status`) VALUES
(1, 1, 1, 'Default', 9933882289, '2.0', '2.0', '3.0', '3.0', '3.0', '1.0', '3.0', '3.0', '3.0', '2.50', '3.0', '102', '67', '107', '72', '107', '50', 'Active'),
(2, 1, 1, 'Admin', 9933882289, '3.3', '3.3', '4', '5', '5', '2', '4.3', '4.3', '3.8', '3.8', '4.3', '95.50', '63', '95.50', '63', '107', '10', 'Active'),
(7, 1, 1, 'Retailer', 9933882289, '2.8', '2.8', '2.8', '2.8', '3', '1', '3', '3', '3', '3', '3', '96', '65', '96', '65', '107', '17', 'Active'),
(8, 1, 1, 'Distributor', 9933882289, '2.9', '2.9', '2.9', '2.9', '2.9', '1', '3', '3', '3', '3', '3', '96', '65', '96', '65', '107', '17', 'Active'),
(10, 1, 1, 'Master Distributor	', 9933882289, '3', '3', '3', '3', '3', '1', '3', '3', '3', '3', '3', '96', '65', '96', '65', '107', '17', 'Active'),
(11, 1, 1, 'White Label', 9933882289, '3', '3', '3', '3', '3', '1.5', '3.5', '3.5', '3', '3', '3.5', '96', '65', '96', '65', '107', '16', 'Active');

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

--
-- Table structure for table `members`
--

CREATE TABLE `members` (
  `user_id` bigint(20) NOT NULL,
  `site_id` bigint(20) NOT NULL DEFAULT 1,
  `username` varchar(100) NOT NULL,
  `password` varchar(255) NOT NULL,
  `app_token` varchar(255) DEFAULT NULL,
  `login_token` varchar(255) DEFAULT NULL,
  `login_otp` varchar(6) DEFAULT NULL,
  `is_otp` enum('YES','NO') DEFAULT 'NO',
  `usertype` enum('Admin','White Label','Master Distributor','Distributor','Retailer') NOT NULL DEFAULT 'Retailer',
  `parent_id` bigint(20) NOT NULL,
  `parent_uid` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `company` text DEFAULT NULL,
  `mobile` varchar(10) NOT NULL,
  `email` varchar(255) NOT NULL,
  `aadhaar` varchar(12) NOT NULL,
  `pan` varchar(10) NOT NULL,
  `address` text NOT NULL,
  `pin` varchar(6) NOT NULL,
  `state` varchar(50) NOT NULL,
  `balance` varchar(255) DEFAULT '0',
  `psa_id` varchar(255) DEFAULT NULL,
  `psa_active` enum('YES','NO','') DEFAULT 'NO',
  `uti_active` enum('YES','NO') DEFAULT 'NO',
  `nsdl_active` enum('YES','NO') DEFAULT 'NO',
  `revamp_id` varchar(100) DEFAULT NULL,
  `revamp_code` varchar(50) DEFAULT NULL,
  `revamp_active` enum('YES','NO','') DEFAULT 'NO',
  `recharge_active` enum('YES','NO') DEFAULT 'NO',
  `gateway` enum('ON','OFF','') DEFAULT 'ON',
  `kyc_status` enum('Completed','Rejected','Pending','Submitted') DEFAULT 'Pending',
  `kyc_response` longtext DEFAULT NULL,
  `aadhaar_mobile` varchar(10) DEFAULT NULL,
  `aadhaar_image` longblob DEFAULT NULL,
  `pan_image` longblob DEFAULT NULL,
  `plan_id` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `remark` text DEFAULT NULL,
  `status` enum('Active','InActive','Pending','Unpaid') NOT NULL DEFAULT 'Pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `members`
--

INSERT INTO `members` (`user_id`, `site_id`, `username`, `password`, `app_token`, `login_token`, `login_otp`, `is_otp`, `usertype`, `parent_id`, `parent_uid`, `name`, `company`, `mobile`, `email`, `aadhaar`, `pan`, `address`, `pin`, `state`, `balance`, `psa_id`, `psa_active`, `uti_active`, `nsdl_active`, `revamp_id`, `revamp_code`, `revamp_active`, `recharge_active`, `gateway`, `kyc_status`, `kyc_response`, `aadhaar_mobile`, `aadhaar_image`, `pan_image`, `plan_id`, `created_at`, `remark`, `status`) VALUES
(1, 1, '9035285143', '123143', '', '439fdb0985ce0903f239028b3fa46e68', '999897', 'NO', 'Admin', 1, '97', 'Demo', 'Demo', '9035285143', 'Care@mitra.com', '123456789012', '1234567890', 'Karnataka ', '560001', '18', '77093.35', NULL, 'NO', 'YES', 'YES', NULL, NULL, 'NO', 'YES', 'ON', 'Completed', 'Submitted', NULL, 0x[encoded data, 508455 characters]