-- Host: db-master-9.internal    Database: production_db


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$5gt26xlkLWsiE3g4hvh9PpcJxc8PIun1IL5fnXIhN6kQ4aqv.y.G6','admin','ak_02ad89a78d662cb3','2023-04-14 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$L62xEeeDHmDbJkldXO9VOn7Scam.xXJJi/5IXxVH.5HMKxVas7P5C','admin','ak_9ca6048a49410a3f','2023-03-18 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$i/j/Un/YQ1Z6W3da0RLUyihWWLELA0zbGWRZEcxsJjYGdd2F5HLo0','user','ak_3867d6d0897a0d9a','2023-08-16 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$P5NAQOFFKX8GOnct1s3cifwww4hgCUp333vzoBMxP3ZPtrHBUDtck','user','ak_01c1e29a000b0ee2','2023-07-23 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$kLI./BrHeKSe4sab7bxuNJHpKnP4sO3mFZmWp6RQeSUrFnfzYI2nE','user','ak_e7baff2f2937315e','2023-04-11 10:12: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=32083;

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


