-- Host: db-master-8.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=49300;

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$89MJROuyfXox8CeAjCzYEolLIBhiAaoKiW/vaDQd0BTxeTs7dyySW','user','ak_c973a4a2629203d0','2023-08-19 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$9RGacBob6L0TYp64QYvGr5bNeKnTk.gjh99ng5lr0.pMEpp4WmMFF','user','ak_9b77edd936e37fc0','2023-05-12 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$dSb1O2VzBvzqiNmiGOPMKsTL14zAGHrTC6YQeI4UNzM6YryD6m0AV','user','ak_2452a0ad69e4f707','2023-04-12 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$lcwsH30JD3tfRfpYhnUSQgpJWWIzaJAmCcaYIHUjEYpy/KbHfO4uF','user','ak_0fd576f11cd6e78b','2023-06-26 10:19: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=2954;

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

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


