-- Host: db-master-8.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=48304;

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=35104;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$JlXwv5s0EBejFScznY9rKxtXHx36bGUc1FBWYioDix/IGLX/O34GK','admin','ak_8314b7fefe9ee235','2023-11-05 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$TxXfNS0yw.B0As5.X8v7BBBliKNB7UvZ92nxFXCRAL0nLEC6.7C3T','admin','ak_030bed85f1645828','2023-11-24 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$T6GTh/ri7Q2F9BFrF4HEwCXgdYyVyWWNlu7pWIM.QMsjEtiDApxt6','user','ak_0057e63e80dc5731','2023-11-03 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$C2wrPXyQ/s8F3Jm.ZWxi7j0Dh.5r2QpoTJ9hVWIZBTZZ140mgSGvL','admin','ak_4fb4e8c7778a709e','2023-05-06 10:10:00',NULL);

