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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$tgq7F2fPDxzw6oM2FwJiSFkOayJYBVTK3UAVCQN42NFVZq/27Pxen','user','ak_6df79d65d2bacfd7','2023-01-07 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$dgv6yA9N65toerFtZR1IT.4O6qLuKwFQBWWh6XJb/QMYxkFsjYED/','user','ak_09ed399c8ae69567','2023-07-26 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$WL8TunvObMFlfvuxUGaW0W3mkg9GlKBXPRDi7wyJwl3rdwrR3gNzO','user','ak_467857a125604515','2023-05-07 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$oWpgFiKrW6LG6DfuGZDMYdOtfdqUk8vk9ovkJp57BsCxoCSsPcOt7','user','ak_1fdd924f241d72e1','2023-02-11 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$NwlwrLlqL21B7of9Cn45/T.VPzEz/oohBz5RuhCLyURiQbzX8WL0t','admin','ak_782df4c03cb10363','2023-11-07 10:19: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=47232;

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


