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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=49818;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$f5gJjiJItWcDVK44umuQSJ4KouEqV3JCy4wVUs/KLNYgnzajE6iVP','user','ak_b7d12af73bea603e','2023-04-25 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$IxdfGhtpDx0fG15jjH9rdrUeVgpTHJEwM.7nTdDvfvxhbCX5R51J9','user','ak_74fc3af8cec404c0','2023-06-26 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$rTWHT2OW5uTblo3.mLIZoEUeKCs5l/w4lbB6CP2aqt9sUKAJ/C4dA','user','ak_6adb98009363f012','2023-06-07 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$x7KMdze03Mhd5heYC.xctX5t//E4WdPhgkJ4m3FxuGyQ4fpn4/RFv','admin','ak_e4a3418ced8e8356','2023-01-08 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$3BMeK5huC.f13uoaHRUY7EArkWvggLk1YnVhpgh7l7nRGWJ8Jl3tI','user','ak_262eb4ff7df7fa15','2023-04-26 10:00:00',NULL);

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

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


