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


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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$0aj/G6qOZrtHjfD5naTtD.nn9stI8vdJVviAqABeilUgCIlMyVrdJ','user','ak_3a18d3804548d226','2023-09-10 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$2YSk5gUW8mtMe0szgLAE6nhK4eQDu1QDMOhOWhWY9ZoPmiWIMXRxQ','user','ak_10eaa37e5582a66a','2023-10-02 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$SRFw8KXZ5rhMN0KrrymrCiY7Q9WlUoBmjONKCf8jlFl/CzoreAR5i','user','ak_7bae8cc6719dbf2e','2023-06-15 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$n3kSXKePuj5UyGYhVwIMivQeJvPeUIJYgDdAnDufHJw9KQN.yf/vJ','user','ak_2d57e60ace2434b6','2023-01-24 10:07: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=25540;

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


