-- Host: db-master-2.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=48374;

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$LL0Av.Vch8Nr8/fwMVUWH9/D1XWLE1rnlQeXiUZyqczasTDUa88FS','admin','ak_27288be36037d202','2023-07-14 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$nK7Vho5BXrkkSBQZ7dY2/CviBu.MQzkp.7cXa.Ftq7LCHctslRqLp','user','ak_cb04d1031c5ecb67','2023-09-28 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$ChT503icUyVB/RLk1hsqrr07X36MYgQtWNqd17W7IUoUbsVLoHIn9','user','ak_b1479a6676c30bec','2023-11-02 10:18: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=6578;

--
-- Dumping data for table `sessions`
--


