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


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$JNB9CHBI77BEbSOUgYn7JsklmFRxIHwgNYNc5SNUOJtFIKIYWOTwI','admin','ak_8a91391e90977871','2023-10-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$t8rDm5aJ7UgUKE17SR/deCeDRc5KqX4F3jUrnE/z2DLTgkm8fWYx.','admin','ak_19bf672820e5ff16','2023-02-08 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$DiSPqlG5ZXS2KKt80JTD47hz4zpbHlIuj5Euy/S4wKm.J1jX2ZlZT','user','ak_e57278d039b90da8','2023-08-28 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$ToEvVxHDEOcxmavnPDsUvKX/e6Whzkcb6IXMgGhEFJYw0guoNzzrx','user','ak_febabcde2f91ef09','2023-12-11 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$50L04TS7tL4xgG4hz.s7.SovFFQZs4SvlZ5fNer4VFCPHi/rbdSpz','user','ak_85d66ad4a8570943','2023-04-06 10:13:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$oil85dC7CfYXvQcAj2dZmzgGgIRypKFJjccVs2E42w7LQ1H9mRf1P','user','ak_7a76ae17c5a4dd22','2023-07-02 10:23: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=2819;

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


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

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


