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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$C8IsyclwNZjRdVKc.8aVH9scXEeTPaJpjGYMB4vvWznJb67SRFyJI','user','ak_0191da6f04a77897','2023-12-25 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$qAsKnobwxiv/esFmg9WoTyAVTbB4v.oBdoB8wd.FMcSYypAumiFYt','user','ak_8834514446d094e9','2023-04-05 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$./.gBfL.L2L1qyqxcR/JMa/Op2AzkdYDtZSPZVwy.jVWKj3kw7cmr','admin','ak_8117bcb4965b3373','2023-12-14 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$SGJf5790IhLOG6p9OdgH3/gh8A2x04qBq1b291dve1TU85NJSDMLs','admin','ak_80b21b1028b92350','2023-02-03 10:14:00',NULL);

