-- Host: db-master-2.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=28817;

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$h9b4cJJd6Jw1wz6c6eYtJ3/bRsbbMgJ6mIJbNXM1S1nIaftgDYX5Q','user','ak_a09357db1ff49241','2023-01-17 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$zS6zYIrRCV018194p2tdg9jVN1RTUV4bYYhZBWqqME7ujrVcRymI4','user','ak_6230f4642a9fd9e9','2023-11-09 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$5RimxHeg0.4b9v7y/K3Laeo2/24clKb0lKXgEk7TecD69AL1.VhO5','admin','ak_ef0f271b641cc8c8','2023-01-05 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$72HqhJKkNiqyQhOdfKlXrP7fADmtGt2uynMGTrEZAa90rJXPOCNJv','admin','ak_2b189aed25d49487','2023-11-03 10:02: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=43433;

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

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


