-- Host: db-master-2.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=50392;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$Wlv6Ett1lB53CjFrJDY/ZwEDYzN15Z04Hztkluf4pWoy2gN/V/r9B','user','ak_c5608f46ae8639e6','2023-09-17 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$DMXsAywnNCvuUXZbXsVfkg9PTTm8eqt2e.HcGcLQqg/2fll05i1mk','user','ak_d36eaa936a880b4d','2023-07-16 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$k7.LCLtWr87LoD0zi1GF9FhyjZEiFKgH.I412nuoFEqbMpHa5eFGt','user','ak_758f85f87aacdf9a','2023-01-13 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$4fqvU6WdgQ1d8q1YTJS0IjuPjwheOt0Nq4O2o1PKVvpT/ZxDiinvS','user','ak_21d1c0ee0feda9c2','2023-03-04 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$3C79DGpw6vn836eBLtXu6Go0k42NDHPb9co0wpF6uzKXVc3b6u6PM','user','ak_5127ee85355495ea','2023-08-15 10:06:00',NULL);

