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


--
-- 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=40043;

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


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

CREATE TABLE `products` (
  `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=25164;

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


--
-- 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=42571;

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$wyFNbfd1tidQn/.vInL28xpWVI2D9LD4YpWD1ATHnwR3kgvg5Qrzm','user','ak_d480dad610f8a1b9','2023-11-27 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$.31.exK6vCTALD70NdhSA6iO/Ub/Tbf4SRHmVxshnZqFGLNMZkkT/','user','ak_c09eb28a4e8d07dc','2023-05-17 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$P.gu6VdPzB1NVN9RYAgcg2Edi5W2jmvY4PZrR.qZHYdoZr/yAp2t/','user','ak_4bafed15c502057f','2023-11-25 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$ej2w0IW6z/JmhK8gv1rtVZ8ZJYvHzYo5XYjcAKQi8/b.X0aEyI9jT','user','ak_7787a9b914236a37','2023-02-23 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$HT2ZwZuW7.nbeSYC0Mks8T3K0L9IWujmp513kkz1IMf56wHYBtyYr','admin','ak_ad2b4c8ed3c8ef98','2023-12-13 10:17:00',NULL);

