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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$CwrXU655RWbESqpiEpaM/rBkwztsIQUMkPl8/2Aj47ZiujLxsLgF5','user','ak_fb4a31578d986339','2023-06-02 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$JsPxzNFe1XevbeQXc/irmxj2XpxM6GZiSNfWESVWYcsuO4L1xg1s1','user','ak_f3b55c7c3071d1b5','2023-02-13 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$mPAh1TmYQtZjxVUoRmogdlG5QFrxM1Jzw.BIixLkmhHE3nDvDdKoN','admin','ak_f8fdf6e18f984028','2023-06-23 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$OOcUSZasW2W4sDHZEiIVbwzbQzgs0qKf4IiLrguKL7fLbw/6KDqcI','admin','ak_1d6f6e55d810fb2f','2023-09-16 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=37982;

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

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


