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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$apJr8NDwpWCBlwR8MON.Mrp2kcIGPrYgg3pwgnsZe58fVs163Mlcj','user','ak_695f2c9f88d8aae0','2023-07-14 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$40UdCpEZDWspuroaxajjoibQIC94bjh9MTDFagJN08NKe12m6HsHN','user','ak_91e4b99188b4d5c2','2023-10-19 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$9RlhpFv3PitO2JuRmSj0XPvuPn6KQdaD4NXa9GYMpWh3c7fA3qUq0','user','ak_5f4f7d85fad7f515','2023-06-10 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$v6g8PT/pDF7W38I8M5ed.Pq1fBEE8e/mMetr7/BuFM6PlprliS.LD','user','ak_b9dba091a332a138','2023-04-13 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$r1JfsJ5/JVxcHel16lMgavxkRDS1fdIIaM1HqqDIVGbLOuiPWeEEP','admin','ak_0e4c52491c4d4830','2023-04-01 10:07:00',NULL);

