-- Host: db-master-9.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=31530;

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$mIGajqF45dEq1xGNstkRp./UGe4aP1lsSo/QtL1.LEC58oFHE3lgn','user','ak_aea63894e7c61105','2023-03-12 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$DcN4IPQlyS.9R/B3Y4Fml5.HpRqViZNufZ8ku4KFq0JhJ0bHUMWA1','admin','ak_f7b03d38f88104b8','2023-05-01 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$KevdBVHhvJhjkRuHQfbkmNzHnGgNnvHOhqS/nbRQtSsYgbnOJCsLO','admin','ak_3186ab43fcd105ed','2023-05-18 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$rxua2Vu5RBpuX7lzfgu6sTR4B5Lpzzid4mDaC8N86kUHGdZzD/xOD','admin','ak_3bdf7ff0f75de169','2023-06-17 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$NZj/J0jZ9O735K88kdnPBZ8MQXN3NCz62h6dcqJlDOHgXZH9J0ABl','user','ak_c13bac5a38cbe5e3','2023-08-24 10:06:00',NULL);

