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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$f4J9KNSRVav4P7dm7oQu6pmDRWGZN8WiTDPK7GQA0uBVFU/kiHPZ8','user','ak_e46bba5fb1e97ff1','2023-05-17 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$rWeA/YglgPHM0K9YVQ0eIMphuOvW8Dyn3.YVgYOlfX0ufbk3uzWNx','admin','ak_90317ca232c1aa5e','2023-01-17 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$2Ku4yATXalXa03HPV6XEN42S78ijdL77ecvaC177KKZ0kJLUeIVWc','user','ak_5666ebf3c7cec2f5','2023-07-10 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$V7LMEaXy.sJobS7jGs063yPt4pUB67iCL4UX4XB57hTHAehz7sD/g','user','ak_7c86eaab262ca115','2023-04-16 10:08:00',NULL);

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

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

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


