-- Host: db-master-2.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=38852;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Gn3fIOzkCS7uNBlLFEEPnod04UCs0wgxtTt5qIrmFbeUetscEL4Yv','user','ak_567f5608941a3a43','2023-04-09 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$16JnYF4wbfUIPu8I7Bq8h7kCl6HOcq92cVDPl8GZK9U4RSqhoDB2d','user','ak_658aa0b9ae45f196','2023-05-06 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$OqDrns32mydtkBLqOCzejc7lhh7.1MVM6Fi8pnmlM2RQ85WQUhxqI','admin','ak_f401b59291ffbfc6','2023-12-09 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$HI90BCPx3JUMi.eZ6WGsO7VLG85CsGdxGvz49vO1i/ThYqzdvtIMc','user','ak_02a18d6ac45456e0','2023-09-06 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$Gk84jjB8g7squSi29TquzBaATKvkD3Df1yc3U.2V0k3MPLqk1/ghs','user','ak_8b4eab0b7dcfd259','2023-03-13 10:13:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$Uq1GGpkBMCrOG89U/./eb5/vLkbh83/xw.n9O06ObbxUpasMas/.r','admin','ak_e17367fb0987396f','2023-09-06 10:08: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=49265;

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


