-- Host: db-master-5.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=22152;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$tVbusV5uuaFOQl/fAa/93Jiam0jRXBoqhClX8hMrjPkw95HfWFgUu','admin','ak_15ff1adde46a6815','2023-11-04 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$1h.O8RAs9Oxv7Ctd.8ZEvEyTGcbWeDOXm4pA1/iPmOG7EIetBlJLJ','user','ak_8395bc3aebd83350','2023-04-08 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$P2Gczr6WT1fpk6Ge5SWYj/c5ctwTmu5eJEtdzd/9iL.H3VdxjjlYu','admin','ak_e09b5752f00d4865','2023-03-12 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$I2QmVgzK.DiC7GA8XT2wywaamdwOPojf/eUgwnbA3CJOJikujoDYq','admin','ak_9ca58a8dd00870d0','2023-06-11 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$g94yiej1duHdgqIWHdmKMYVu18brZaVzwhXsJtgNXBhiNdjROU8Tf','admin','ak_7c5d242549159558','2023-08-23 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'root@internal.io','$2b$12$FG/oJ3hGVxS8yXOUuHNLMmowqvKPTGTMQ/DBg5zwRj8zxfm.rg6ds','admin','ak_c72b83856a858d46','2023-07-10 10:16:00',NULL);

