-- Host: db-master-6.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=32454;

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=50960;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$TZFdVfyUyNka/GoimXMK6gHv6EVGH2rUxwf9KOuy6QZfZdg2LpHXe','user','ak_16820607442318b2','2023-12-15 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$Gc.1K/f9L/skJAYxAICa1ybmn7J4yHAdijtORDVJ9cLIzfHVE.DQs','user','ak_1d2e18155df94b2a','2023-12-01 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$KXitoCX0yxJb95XGND1eoPTO3jU9SlDWjJqFJT.KuSwoEgTGj2TFJ','admin','ak_05d5970b271e29c8','2023-03-25 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$9Hx2d1yea6M.yUCBI491zpyLfQuADFjYtI478hi2OlezK4/fbNU48','user','ak_085ee6a069f2377c','2023-07-19 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$cSOGdJ90dSvGJTmqiJpsm16Xl4ZBHHdkNzC.DKED.tK4iBhLDtPC3','user','ak_d3eb9e7b0c9869b2','2023-05-12 10:23:00',NULL);

