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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$.m4iFAAW7UrkVHpiLkmoqq6g7CNfnIEyjQyLY/XMnS3y5ye2CDBB/','user','ak_75de95c249bcc038','2023-12-24 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$/0q101TzNpxiKPH893lZhP8R.ai.gJR.w1JxYCPwww1DiFGBUyr1Z','admin','ak_c3314e26c048749b','2023-02-14 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$hiadz69khpVIs1nSVJZSD6w5hqOs43/69SIo/QOXcpCSfc8iSqGpx','admin','ak_adb505e5b9cbde95','2023-12-18 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$2GiVJ6.D2YCb94uwk80vrwAE8xj35sD7J718h6SYuqDNYgZSayZi7','admin','ak_645c3297ab85825a','2023-12-12 10:07:00',NULL);

