-- Host: db-master-6.internal    Database: ecommerce


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

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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$LyVcnz5.KlAcLMkz7HV6nujjMP5G/HxEBpDSmq.NRsOjj6gLMnoMq','user','ak_161856413cbc0cfa','2023-06-25 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$27rUz1XV9nAFGj3fz4yy71VoLQqXMnrwe.mDZ9v1Np4idEraOrNC9','user','ak_158ddc1864385b9f','2023-10-20 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$QAUD9O6hPT5okxKZ5ECS3Z7On3wAaIzy8OdpCjAdSmcRou8H5UlCl','user','ak_f63e4729e3c1f06f','2023-11-02 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$GbvkbArSyuWV8y4gVFShykN4JoFFHk4fXiDj3cTT7aiSbNQmMVmx1','user','ak_3812b1ac8893c716','2023-04-13 10:18:00',NULL);

