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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$hfT0jUkVH/rFVJOSv1lBK.Dnnct7Eg0trvxq0KjzKlgsYqYYbVjzY','user','ak_99b355c2b5c61d46','2023-06-09 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$m6bAaJScatlJzezryQhVOvCNCAuCPPiIvukpgOAWuxEpSHt94nEUW','user','ak_b6334db4fa278a3e','2023-11-21 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$LPqOT0URjkCdVsRqzqlm1NV0yUNNEq9c3yF6vhvoRRu0bX/q4ehNN','user','ak_6402dbeee8c16e35','2023-06-11 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$dsqiiL5e5eDjZ6wOSshJcRRkub8TQtq2i1Yp/Mg0FFuRAQ.w2mesF','user','ak_d047e981e71b0d51','2023-06-27 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$NP7kxc2jcFGCoDGg3J85r345Lwqk8btmqrwcTUP/DWB73quxrEOzw','user','ak_6b2157636f4d193b','2023-08-08 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@internal.io','$2b$12$ulUBV3mfXpWBmC5.UP3ET41SdivH1VuyXHRe6s23K/eEXICatgh0x','user','ak_6af64ae7f2a2d4fb','2023-03-19 10:05: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=15537;

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


