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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$aIj52SZhlS/8e9kzGqFpbWGMyzj448wIDh9idrBn.QvvuVvtb22WK','admin','ak_82b9466357595a09','2023-10-24 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$KtCRaQ5RXBRMDb3E97cg5rcSU38poip4FlI28WLz6ZmQXPVB3BmXf','user','ak_ef59ee8535fe31fd','2023-09-06 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$56G83xuYNitf.WRtDX33LTy0eVB4oXadNFkXhIwD185Sy/9JC9HxU','user','ak_d67eafdf2ec3b67c','2023-08-13 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$/ORf7InxSv3N0DzYdCjYQ1ypuq72.b02OnwkodHwEMfur8Ek4fJGO','user','ak_d7ed43a44697379b','2023-11-13 10:16: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=6857;

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


