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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$gSQouRySVCeKnU4EX5lbY9VGc1mZxBYAiHIXn4yJw3c5anToJPS5N','user','ak_b712602e92300a62','2023-06-28 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$9WEVaDwo1oJqYa3U7f5fxUMGkIR7KZDICrBuoSD7bI8C4ZakiPLJ0','user','ak_8de523593b2f987a','2023-04-04 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$6FlizX14Ufm8ELjcQIWFyBeQl9LKC0Oep/.brNIqmTuG4HcZKOArk','user','ak_88ff713c6cd0c71a','2023-12-20 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$XDpMo6J5nRT9YULwJ6jGxi4LtfMxfxLR4xioPJd.8H/MA1VrMLZ4g','admin','ak_c380f56fa62a6c53','2023-04-19 10:14:00',NULL);

