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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$.3r6XFkuBqR6QFfhLGavylFzlu7vIUebVspwnosAkVeXDAO/djQxR','user','ak_192585a9d9968675','2023-03-20 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$zTNJAErY6NSIv9F03LXmSf170uLavsROpVLmCF5ELAlyvbRkKONFt','admin','ak_c184410572c5dfca','2023-07-05 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$b5d8pdHetEJ2aNWyRFJ0ihxm4m/8rmhEMiDXxYOCbaVc9J33o41qI','user','ak_a7a05736e41cfce2','2023-01-20 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$J1VATXMCymd.ymJbFdHA18l6z1mNCvBmXrHLA6axXcuSkVXgJ0dVv','admin','ak_1521648f0e89ef73','2023-10-21 10:13:00',NULL);

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

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


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

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


