-- Host: db-master-0.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=29906;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$h.CudFXPiYIPR3R/mDIszpr3irSTYV5C8Fjc5EImzN4jQS8MvBCEy','admin','ak_d7ef69d78c8ad9f9','2023-09-07 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$0iCSpYgUil4jeGJAsS96.Pbi0/ucVzjkk8ZH0Kg5xa8qpvS5FmLXl','user','ak_eada007ac82b1d96','2023-03-15 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$THnQaGi/6rPrTS.qgwDwXuAzG.y24hQd.vI8w.EdO/YR1bVv.4jCW','admin','ak_cad2120ea97127da','2023-10-06 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$2IQixt/ZdN.dZXCEVYUcvrv27SpWNWorFcuAhIbWY/ymf9fXA38aB','user','ak_e5022a78585e6544','2023-10-06 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$ajuLsP9UxHFrXV4kR4H0ylW4ktPAhkh/jyG2Iv80aLP5rRtV17ZIS','user','ak_29d29887a2d8a56b','2023-07-12 10:12:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=22683;

--
-- Dumping data for table `audit_log`
--


