-- Host: db-master-3.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=29775;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$UwAIEb4jCHEUs9cJQVhc2.RjWU8glgt6im/QhLGZ1Bwfz/5ylv4mE','admin','ak_0b4843eaee56e5d4','2023-03-10 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$MeO9Ss3nga2CBWwjyZqvrORLfglZzpXKyVrdbqbPSQwvGlYwNlfFf','user','ak_1cbfcc23c9813247','2023-01-10 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$psMqXO0yPZPDqIkQ2rNvsZ8qpzzm.L/iBwAhnvxA1uIcUaYw.3xLs','admin','ak_c651f77a95eed0cc','2023-10-03 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$6larMtQDyOTW9vwlVTMzF0JxPg26TUzrAjfV/rUBALhaFa6fqHk7V','user','ak_906a6b738cd27df1','2023-02-27 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$6he7sshGaN71rj5ygpb/eixzEo.eoZ6BF6Ur9TA/sGMf8xN1UmDYo','user','ak_fb392c7662d6d181','2023-12-20 10:04:00',NULL);

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

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


