-- Host: db-master-8.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=7959;

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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$Rz7WLZr4zKesvaovMPb0n7LTUgrkmnlkSrTVnQHYnDq7DLCbsPQNg','admin','ak_039f5b7e8a5e9454','2023-01-21 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$2Fdzk1DGofY754rZyd1lGEJeK7H99DCc8.20glG43NNwleXlxS1PJ','user','ak_8f5dd7e142f7de0f','2023-01-11 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$O5EEi5CdqfrMI7p/rNfD974WpAkhMiYsZQmiiNIMFqUrAijJ2FZL2','admin','ak_6dcc3694c69d6c03','2023-12-19 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$K9fv/b83l2DCWuAT1TGi3l13EcwIpFwfA0uY50p3eWZkStBuSJRes','admin','ak_a61529f396f3de6d','2023-12-01 10:09:00',NULL);

