-- Host: db-master-3.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=34036;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$WzMA46oWzTVAsRMlJWriFDrwWzBtZt8EIMLLft3t8xBudJNjjKIHy','admin','ak_f5ae0391882263ad','2023-01-27 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$8PD5c46S359DuYP7Y7DvICJDhgIaOqvMfIn0zMbOgHmfDjQGzPRtm','user','ak_0b6d55529295c0de','2023-01-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$UIx11Ql7mVE6DudpauP6KnsHnk5gcyjccyqIayfBf/MlzBcGFLbU/','user','ak_6bd81f129a2604a6','2023-01-09 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$wtwOKhF/bNhkLRc/FeC7690jkSo/T7bfkdeEfz77zsJrfin3XzTTI','user','ak_a50ebfbf67532d78','2023-08-01 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$b6rV8QblCFCTRXWeR5AqbETgS.1thUFQqmSkK.y56aTdc.to4L3.N','admin','ak_a98bf9b5c8d03672','2023-01-13 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@corp.net','$2b$12$kOGzHsSijPizQDeFkWUSx4G6dVkrf0XIggkOty4YNs.Wh02XX1Apc','admin','ak_a21246a2628406a7','2023-09-19 10:02: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=22743;

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


