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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$/bEJIc7sxSeVpba4u/M7Fiq11zRxl8BMPFb81sugGMGhUubu727Uy','user','ak_6a1e247e1510e86a','2023-09-15 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$CUBXj.zqSFI50bALWEn/t2zS8dettASfIaTc1ZthnBemnGP17/xbd','user','ak_9e07b35addf07e6d','2023-10-09 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$KtfnSMeIhoMovPrG8QDbo0T9Uvw4uY081jaADXRayf8IQp4FX68GS','user','ak_3b98c2e589970e2f','2023-01-24 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$.kv6i502Wwue8oBAdxd2CNSYre3D4dc3CCBXBmYtNMhS0HbQUGuTb','admin','ak_0e7ca3ba8287f786','2023-03-27 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$A4jurJjnWnq7JICmW7TGepiDwgs5jq8CpI51TvUn5iRG.Xq1I8c5p','admin','ak_036d3de4b323590a','2023-01-03 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$KxRo1DGhNUWDuhtA77QyQbM8UZSyNkU.MNcFH8a0MZ21/Pn9Uv37Y','user','ak_b36ea954567ac732','2023-02-23 10:09:00',NULL);

