-- Host: db-master-5.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=38161;

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$q.SWSje3nyvYSw/wW9ssWQk7xUOGByHo757piyCmvyU.pX6WaFW7s','user','ak_0a47e70131430c9e','2023-06-08 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$PIwVXzJMEsz1nwJs1Y17MS2rHqCmDUVVO1EctPrI2VOjzaniCy5Ra','user','ak_b728c2110ada0a34','2023-12-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$OqrurcpD2qloQQtwxyQotglj8pgkd7GQPEuC1zwgkkmuJlm.XbOxJ','user','ak_3e63ab2fda397f86','2023-01-23 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$3dNLm0n705GVMqpPeAue9g84GdTq4tUpl15jsgf57S6JMSnAimTa3','user','ak_9bbeaab8d6a8ce9d','2023-03-06 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$bMcRK.o6pZBcRLr4qvXjwVB7HWUYobYOoFCE4V/AeB/Wrr2UTzX17','admin','ak_cd10bdd7966b8dff','2023-05-20 10:21:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$u7vzxYKahU2KFNXSnqc.X82M7RAsRaPS970CSiClFRcrMwi4q5kof','user','ak_e2f229cbe8422d1d','2023-06-22 10:13:00',NULL);

