-- Host: db-master-1.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=38550;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$IKoqyBMr2ssOYfVitHevVNylIDMVhRxcFn03.2J33Ia/9T4yhNHWM','admin','ak_ae2e1f4157e4fa3d','2023-04-09 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$GsUs5DEkSKSzyt.Tkm/LRvwBdNfGiUAyQO3bNF6kiQ.YfusWOqO9R','user','ak_43e24c17a4d80089','2023-05-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$qXtM5wBfVx9oXLzEUBvCVNaf19Tg7B8YdPBA1c35uAxj20d4qmPtD','user','ak_e15c3cffdccf3956','2023-01-23 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$OUFNTREHZR4JA2WPXNrHI1A9PAsAIBbeCak60BKEn0yhdk8jjfbY1','admin','ak_3818ec5633ec7976','2023-07-24 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$sGos55elbijnqWvLCG4KqPMJVfJLOjVNFgTLj27/94tPJhEUvwhkw','admin','ak_ace27a890c54f8df','2023-05-14 10:15: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=6415;

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


