-- Host: db-master-4.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=22075;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$kzduNgXP2/BPAxFuYQzLO41KtXM67RbgRtRazKKuHdTzP3JyemIDk','admin','ak_d6b0e82af4b5450e','2023-07-18 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$d9XqYTIXnwkqK3sicRANPYUdz4GKf4/EYOE7ImFV2OERE1CNkh6pB','user','ak_0854e35f6dd8231f','2023-07-16 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$SdG0GhqI33jTznnZ/fdexEXFg5b4p3p6BGV1wsY0SCpwb.sYu/lG1','admin','ak_b9e4f8486d634299','2023-11-10 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$QRcsHPBh0ExSNacllvD.xmpMxBraVRKztm7eyAAPbzDyHIrfO5QFr','user','ak_4ef363e6f247cd07','2023-08-18 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$bRzDycPKRBIuILMbBhUpKWV67ZjY3KfZF.cyyVljr4M9q.KhwRRnb','user','ak_96ef7f429b44f3fa','2023-05-23 10:03:00',NULL);

