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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$fTlGzafM70iYpWd7uwQeZPajk6S/M2wCaKP2RKs5c5KliwnsoxQ9H','admin','ak_2367736773c29293','2023-09-17 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$tjTiv5hzST5erQR9B4YGTKH10TtweBej33IelplEQr6MPNz4tuVmZ','user','ak_a6b215d086ed1ee6','2023-02-10 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$SJ6eRYxNAltg1IWr1Vzqs51XijLEwQ4tKAD54mAsdBOoAklMfSpWB','user','ak_37766737ed9453c2','2023-04-26 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$uH1y4drFX0JnSk9ieTiaysypFUIIneoasCyfA5KmmLHGOz2qmIHED','user','ak_4014dc4a124d71b4','2023-12-09 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$gmMhxNeU.bE0RmJZoLdEHrPsVUnMLgrvaf1824qRFNIE9gvtINcH6','user','ak_e78c6d6284c7f701','2023-06-19 10:12: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=13013;

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


