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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$mEPzCxJvQdLUeB45yal46zTfJKHatLkO0deZz7wJtqCdwu3VrR53t','user','ak_592d51fc8452bb4d','2023-10-18 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$BiC1mGAMwYdVoHYOZmXHoD/o71SwxbPMB82Hlk9b/2G/TeO9hQOjc','user','ak_bf3d7e8812cf3419','2023-11-05 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$QykLcIjyilPzCb4PLzhLd7Os3LTcEYfaQVmLD8jVfetAYR7gKmRfP','user','ak_e6ae9f8cf9f8b303','2023-04-19 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$IZ79/WTEBZ.bzu7oAz22DeQZNtXenxM7DM.N8SziVwT4/yM2dKW1T','user','ak_646d2f21a512011f','2023-11-02 10:04:00',NULL);

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

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

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


