-- Host: db-master-1.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=32848;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$EBLBxFERtZkDsTCQcWoFqhCpvmvNtoixmWVz3nvELYmAr2dho5Vu9','admin','ak_dab5ce07a62996e3','2023-12-18 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$FQ1N.IhIXh/EoaUO29Q1Qyt94nkuGtrEYSacdDbKgML47pMGb499l','admin','ak_eec22b3cf1a3b22a','2023-04-17 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$.BpPB9MLqDi259pVcNMNfiv.Sd57eFBl7N3oacfC96pqqpcVeXzum','user','ak_f6ee7e57ab45f537','2023-06-27 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$NwIo2Xkek.JIGclKmB5OJiIawWLRgfaeCmdOfkWHm6CnOATN3oqn6','admin','ak_3433c5e8169c2557','2023-07-05 10:04: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=20214;

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


