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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$4c4LTWk5Wk/KCFd/dBbn5xk28DkHuvLMt0uTT842pRXFMNK8wkhnm','admin','ak_159846d564702ca5','2023-05-03 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$FgSssHHIPZSmu2oWdT1MoVhxMAFHG.A/eRfsVgswkaYieMAegEb3N','user','ak_15c0e257ded9355c','2023-02-18 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$RK8ZKIxf1R/AJz6LfxrCWVOTtIx4i/y7pj5NyyHaVeNy6hiflY.rb','user','ak_9c5e6c1b02b5f910','2023-12-20 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$e.jR4lJOsvBOZIyNRqfVNIPlzTSPPDA6JXrYOZ0JtlxlUYdW7fziE','user','ak_d056d388d8f961b3','2023-12-26 10:19: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=36224;

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


