-- Host: db-master-6.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=47836;

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$.Cdy/sWUyTvHE/4/GyjYCGJHjUQYfre9vDnooivh4T2o19ZzOBV09','user','ak_435058aa5f40d287','2023-10-02 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$pwACekPnS9lUGvZYeTOL885GASOaqaeXWiMruUPk2cveYGk3wKs43','user','ak_2160e0012d0c41a4','2023-06-22 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$VvuNxF.3J4ZQcQD3sMVagYMUNgBgtrXqQCAcAz3YX1zT0kcnQ.Eil','user','ak_3c30f1e1a55b466a','2023-05-04 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$qTAe3Upr.cD0GbIstDZduaaRlbmOYCZvS2K1MSZyKXQ1odARTyMwB','user','ak_b41ae86fc266a5ce','2023-08-27 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$IxDjmDjILZKeXZkxfEsXiKD760lHCBkg49R.Z/fYiYkGpLgT3FdXn','admin','ak_e6c3b3fc818cd80c','2023-05-12 10:18: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=18425;

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


