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


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$O8eeOlDnb2CFUt/efshQyYCeitWGkhrtcubBeYeDwwGKWA1w86VhN','user','ak_57cc2895ca876670','2023-11-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$f5vgREtRT8TjnwlJMssBMXc5.rQu1vM609BV37jvapjfRvY22/ojb','admin','ak_bcbc71d9b53b2b25','2023-06-25 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$EKPUuSwkPvedhz6zfw8eIKleO/fDMDQaPYsSkkrjYPmqywB66xsmd','user','ak_b3e824d77e9b619d','2023-09-19 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$a1Kq.aqTjsXckoMCOJe47W60WVImM3N7nPwtPA8MTBnjzcyALonPw','user','ak_d7a6f91d32c3c972','2023-06-20 10:07:00',NULL);

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

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


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

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


