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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$qPDZ8TPhBJTcBOyKHWVxlLM1x/gxS14Tp00knTR.4drsyogqugXMO','user','ak_500131082c924865','2023-05-03 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$TGd7wJ0eAL9WmqKhOXmWWAj0IfjIme1AIpI13Chk3NWqprCcJFLTT','user','ak_3734e8f75a2fbd34','2023-04-18 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$dOvEB1IbcVhMweqmqQNspg92coDi6YxcRsgqNrmULx27ga7hsnO7d','admin','ak_8dc59938b39a38ea','2023-03-05 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$j6UifpHnkUiUSmQf.acl3/a0XuSpmZVmKiUvt9J0LH824qQW8xXrF','user','ak_b16aa633447ddc88','2023-05-20 10:21: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=20576;

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


