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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$.TmKp0GuRkg9DqQT8FEDOG/iZbKfgEGMQs0GM7Dzu..pmDSXt3nSS','admin','ak_5b3a53f0594d86a0','2023-09-12 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$awuLRzX81VQMz9C5bOMc2UHmgUyZTLyo1X9drvAhz1oBXFlzQvs2/','user','ak_9c72d32098cfc8fa','2023-12-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$4MBzE2PD/fR9JsU58mT8CW55SelMQgu85DbS.UZi6JrnJvdXm6neM','user','ak_59d35d010c8dd74a','2023-12-18 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$O5AhuGAuOlvezB6eTQ75uw890m9F.TBLHjxMIXAMWnfPig0Lb444r','user','ak_9d054f5ed82effbe','2023-07-02 10:00: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=30381;

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


