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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$6epOVz7KMx4JjBy7vaRI4bQLTN8vdLEQuNsXTD02OIx1h34P3Ib1Q','admin','ak_d20fcdf63aa8ba1f','2023-07-18 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$lHyAAWMLO5j5gx8MAQScCKZGOYCVM/WNhtbV3C9952dN/VT.QwGSy','user','ak_56f6a8343f907f4a','2023-03-09 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$AAjSwx3jPYedrgbs4cx5OwZdvRmqa714359Vh0gsMtfHnMjqHlcUH','user','ak_fdc9a16b87c4ee1f','2023-03-03 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$zW4PDrErSmWUax8spglNHhFvs0VVyLPNsPLgbiUftKUoi4nEBIZgW','user','ak_cbe6d6536d039193','2023-08-06 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$QdOwpwXgFtRM1NLNIjYTkDb3yWVywjILAExkI5LBV7Z/7FCRxmdKk','admin','ak_6ed6c319fd65281f','2023-10-05 10:00: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=39670;

--
-- Dumping data for table `payments`
--


