-- Host: db-master-6.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=29376;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$s8aX0GpP9TVwUzZpJrMIjSQK2LCcdQdoe9LqzkNNRbDB6745pnAhj','admin','ak_1f15e8193af179ce','2023-07-27 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$X/OKxWiuPpLF/8vWq2KnzTDo9kCMDy82FSZGvkpX6/7tPdTTsqRsK','user','ak_d5ce4e886c0787db','2023-03-14 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$667f7WfLHvbTcz7oAdlkLy1V4JVRG2URLzt4IpsarH8FRaTHk/6s.','user','ak_c39f0b7ae01ff9ad','2023-05-24 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$wp4vnaenhE.wwi4.Lp/f.6tFZbxd.stYk.J7zhdDZ4BGjduDg/iFr','admin','ak_200d9745ac77f87e','2023-07-25 10:02:00',NULL);

