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


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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$QIoqY/be1ejiaKvum4ZX/eJpcpwJBVn9LUKUtxIf.4VaM9KJ.rhd1','admin','ak_9501baf32f3c664c','2023-03-27 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$OENy9fUOgyg6c6rVEWMb5Cdi3D7j/2C4UO0Pz.5lwHrWdi6ysp/Sy','user','ak_284ee3755a3a429e','2023-05-23 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$LHJoDZhXP1NjnXP.azZ1pLEBpQg8YD4V26RvX6td.UsgHdjw5JxcJ','admin','ak_da8ac08e05162896','2023-01-22 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$9an8g4qyg.qQIREcjKFNPf6KSqqWmDqXKZ7Vm8c3KgG6af4iUElBS','user','ak_b5c6a438bc23d8e5','2023-11-14 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$i8vgidJFnCYhWdgU51oh5oBuO4icFv193fchagD7skbTf9zQ1DNI1','user','ak_dfa7f187465ee378','2023-03-28 10:19: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=20425;

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


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

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


