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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$8Zm8hpaeKlU39c.EH/Wl.z646mQIVzKWH.VeqGeqKHqQP7MzTbPg0','user','ak_2f1a8149a8422914','2023-08-06 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$uNnqfcU7yGyBnRrfXVrM1L1Qxp4KiUTJqyK9eQoyNO8oUz9SFREA8','user','ak_240fc24c1dceac8d','2023-08-11 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$miHzy9Vv.WWf/JUG8nE4qxP1co5/mS3ak13gXafQmMT9ZC6IJtrXA','user','ak_66c285411e8ab11c','2023-02-19 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$0CHegum/96Lgl52NIt9Q6nS63Zl27vALYDqF1mvyGtZlInYWYqs3g','user','ak_4f850889688c8a69','2023-06-09 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$KWSiyNmCF2hGp8Rw7N.K/N1r6kPMIpBUT0Bzd9yOq2VRxz6UL3KZu','user','ak_2bd9cf34d99507e0','2023-01-14 10:14: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=46073;

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


