-- Host: db-master-4.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=45435;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$Is/ZrMrBWLdEqLmAJ4GKKm/YTjc9o5pQSa6mjNa9dwYyppdRI84Tm','user','ak_6d242d3ba16d26b6','2023-05-25 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$qRFvjBHKOFyc7/J4USVl5KlBCoKTqdwtKG1fIVT1JcjEM6SDq0hpk','user','ak_d75c546ff312fc30','2023-03-10 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$4/jx.VuXlBSMX04.ODGOXI4d2e5TM0frAfxS5aBx9xfdH.fsRVaFs','user','ak_5736fbc40a49df98','2023-09-17 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$XFSJUcgcnsjnpzp2cbXv9nrltgPSGtzi.CUKeSxH3ZkVUZnBFsodt','user','ak_50ad6aa034f2248d','2023-02-10 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$AbePvTPsqJtCsEtTZZacQ2NvxmocPnblD.9MgHDCCWUBiuUxm0V7Q','admin','ak_85aabba6cac51814','2023-10-01 10:03:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$8mLPBRkgW47vhqr95SUnhvO0GMPFko/2/DA6.RtHQ7gDedcq734if','user','ak_e32d0df624828bce','2023-06-16 10:16:00',NULL);
INSERT INTO `users` VALUES (7,'root@corp.net','$2b$12$1ilbovPSarzQcz6uJiXA3Yiehuc0DjaXFEe8DCRP8SnV074MA5ILH','admin','ak_0447b5c679870067','2023-01-12 10:13:00',NULL);

