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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$vq7iZKOV7KYTlilJGJZ3rCt4Zu.9M80HDpL3yCvNQY5Nn0U0xtgOJ','user','ak_a2bf9875756933f4','2023-09-27 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$m0y1SWqydA7ZnPqN6GXlPDnuZL37PEIfcQlmBfOu6ne7PDvL8z832','user','ak_18d3d920d4bdaee9','2023-10-24 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$piHeUhPGJ3/cq4aZaJHFAcDw5qlu6PSAst2bcjwoN3cZRy.QFGVxf','admin','ak_26ef62e6f432d398','2023-09-28 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$FLTIi9hvg.OZeXl0sNIyUS9h7k0qvbhA9DUFmayWAiBPPpo8FvoZN','admin','ak_d191c38bb0eb76d0','2023-06-19 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$o5Tn0PuMIawQzcozNOSDNu/IPabM2FbUpe9m7CRqG/A6VYTGfIQFR','user','ak_5a6e39f366ddd546','2023-12-21 10:15:00',NULL);

