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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=45393;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$bx5bBDPDAN8od5v63CU5HPZ6ZlDC7YZ1XyMvM7isH7UxqNjj8DswP','user','ak_64c8a98d40398d5a','2023-05-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$eHh3mxyk0OXr4sA8FQeMlI2yg6fM8d3.hnqcaBHvMZkqD3O66QuOx','admin','ak_e9d627b02e29d7a4','2023-10-11 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$cNTjs0dIdg77TAhlHaPftNrJSvOmxoN4JCerh2wQJdq/ZYMuBCMwl','user','ak_64c30e10bd66e487','2023-12-01 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$rJgEWoL1828xl8JxH3VjRiWOOsJrEwwaxES6SXLmDzCfczampRVKr','admin','ak_c7bea24ceba194c9','2023-03-12 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$7l8aqqhyRup842bSpGEG/JxAHsq2EEa2IfypyrD/R6WWTHzkMJvPU','admin','ak_423049ba7513e9cb','2023-09-09 10:14: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=34957;

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


