-- Host: db-master-0.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=37834;

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$8cv3Flcmpu9iAr4a.wmr8qVyKtIQF6FEGyRyawrGq/Y0GGnLMV9Vv','user','ak_9a461e5b2715fe86','2023-11-02 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$2vekT7Ie1jf5FQUaHvh8ifFghV9kOJ5RJOFRi4Msj3I7djsiARSMt','user','ak_05630640f324b99c','2023-12-06 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$zpTp/C35CUYvP61CZWelxcdQsQQO7Q8z1GZSHpRVG9r1AKYve9tFu','admin','ak_e4a1e09644066e77','2023-08-05 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$TtTnXMnrsMVP.8SW/7RcgcYHAbzlCdKaZRAXWCNXh26fQjfDKEn/k','admin','ak_df19083952ee4377','2023-09-19 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$TJHSiMoZyrASmre6wUex8Chzqry/LMtT.5ft.bLbMRoj/zsiDtR3L','admin','ak_d1e0d68bfdc4397d','2023-04-26 10:19:00',NULL);

