-- Host: db-master-1.internal    Database: ecommerce


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=8977;

--
-- Dumping data for table `sessions`
--


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=30890;

--
-- Dumping data for table `payments`
--


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

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=45226;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$t1QCxoz7JpSIudnq9h2OhTyoZKEds5wZ4oDDlCGPmo42rh1ZdX0CQ','user','ak_aa8ca7b2d0f0f835','2023-05-23 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$L07u.vxrb0voAoIcM9dmnVZ3BH8xZyEyT8xfr7ydJOKRGxobGmSiK','user','ak_c2b0e834f240b87b','2023-09-24 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$XLZk4Btz4M96RwmIaUXtq/3tQNqkOjjVHFtKCgcs3xG2mmWBurXuU','user','ak_426cb012dbc5c72b','2023-06-07 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$RdRTrDM4MBiJRfi9m6D.3k/rkd4bokkIse2rcPe6pMeDV5A3rLWQX','user','ak_afbfccc8e7f1dd50','2023-08-09 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$EsaqxqwhopVmtJXY.beVvwfinFQizGkAJShKDb02Qu5FGvzO/aABO','user','ak_9fbe7730347ff1ac','2023-09-10 10:07:00',NULL);

