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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$U3Zwi2wtTMiDDCN3OHPpfmIA5v2.SXACPiQhvVVSaVZVybhw/oyyX','user','ak_525a796771b5fdd0','2023-02-16 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$O3vDktbx5EtwkwBav2jwPg8DobsyfxBvCbcvHjdoxSEmIZuZYHv6F','admin','ak_ec3ec668e90d54ee','2023-09-21 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$UM6zthvyZobl.FmxwY8Nft6OMtdQkrYqOCxmIrtmzR5pc7JFPYs0A','user','ak_638e8a8c8eed9ac4','2023-05-14 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$CDz38bs9HmqdhjFMorTml5KoIDKcFtu50/RraAvB8pPDjHw9Nq.0q','user','ak_3af3eee115b479fb','2023-01-20 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$VSVKS9eH/zEraRnAuu/0s1xOT/KOnuEiaaDVA2nhsQV0tpRqX6deb','user','ak_8ffe58a84dad1462','2023-09-11 10:10: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=10185;

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

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


