-- Host: db-master-9.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=48016;

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$6smT3HgOlSQ30TETSiG25c.iFNlMHE7Lm5W.8Zc1Ngd/FXFfU6Up4','user','ak_850e9c95c1689c26','2023-12-21 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Rezc2ta4H8l0iP9CF.v4rfWtKCQeT9ZDTieIBC5AC7rbQfNhOBrHh','user','ak_4882b1f04bf5ff26','2023-07-08 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$2tVhM92EUyp8kSbR52pSDbDsc41aIpowaV.UJwQNqwjRavtERtZI6','user','ak_978bd72a5cadbe87','2023-04-13 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$8z16xD/hEQV7R6O.d0QJ.r7asKSEu4nxQnlP/Q4iEyubjOOrQijko','admin','ak_ec6a29c639b85e32','2023-04-09 10:22: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=25332;

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


