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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$eBxUVVSbt8bD0DPvZi8PPc1cuiutqvagtDo7TOMIH1Y2LNwDeFUEp','user','ak_f89f9cfaa3b4701e','2023-12-23 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$q0NvturOGw8FIvOzgF4tkxsZK/o4stNofRzHcVSTrfe9rvR1GDDM6','user','ak_5ef1fd74ed2eef00','2023-02-18 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$70YaLFgNDTZtdrssZFixv2.mE/MPpnX2Heohw9Mgna/QtVDRf0NSx','user','ak_8cc3b24ac4c221f6','2023-10-19 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$o20fgx/hl1mZUVKoJokjgZVd1.zxgrzC5A3sV/Ice1pLzTRAfnUvK','user','ak_dc6ad2cb7fd0638b','2023-03-21 10:22:00',NULL);

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

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


