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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=25138;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$r39BFj8AaFzQYXSbeDIHviPU60h/BnRqj84a0LbffjKwk.su5nH3K','user','ak_d61bb06c2fbc25c7','2023-04-04 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$KT.Sn54Z5cqQc3zlwOQtkRq8Itv3BoB9waDyNZxIuB2KPEsrURBvC','user','ak_7fce685e3970dc4d','2023-06-06 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$FpNwClTSW6mxiX9.LHaEizkAkjzQYLUKjr7n8k0k/E2ueEaGpTH4a','user','ak_0f2460372cc319c7','2023-04-06 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$ImmNDuntSH.vcT55w/0qytWjix7E3rjChLWqyip64s96VvmTY6M20','user','ak_53e5a7e4d2b49794','2023-08-10 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$doTqP6z/H56L2XG9sxbvt45vJbzVuGwJoKXoW4DOXnlKmF0eIaZnC','user','ak_f2fd9d24dc87edf3','2023-11-02 10:08:00',NULL);

