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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$fuFHcyOJhweu0O5dzqm5bQAP4GkYqZr90PGJhndS9TSOVkBcG0/gw','user','ak_fd0d384fcc1dcfe6','2023-04-07 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$jPIF3SuYBjoiTLVfEKEJwc11t60G3jJpV/VZNsqf1ipYIRT2OnRjK','user','ak_e577bbca577011f5','2023-06-20 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$vlJwUON5gwb9YaWMeRM2Rl1C7BmN6qwGyzqmX/lZWUGkJ.imxq0EV','admin','ak_9d3202ff15667f2f','2023-09-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$OwiS01jFK4w7kk57hMtElVeTu5jgzoRv0.NtQQHpN7.kopFWB7sLR','admin','ak_bd28af22f2207625','2023-05-08 10:20: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=50264;

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


