-- Host: db-master-0.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=48340;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$wQZqDVTJBJb1rYmiDxoabx5skzqLXqySvXfR2UUSflhY8WYy2WhFt','user','ak_167f5c07839b89e2','2023-08-25 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$m0AFdSnF8rAtfkDjH.e5RBjK4EYVgwazlrfMkLNkwMS2fMLBTHC8e','user','ak_d57c41fa028e7263','2023-10-19 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$SCMbhWOwMwsNL7AaEYNYSztTLSB0q2T2aFjkg.63HGOgOdTvPHKdb','user','ak_bb166691d2d7b946','2023-12-22 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$sIe0phVBgFeYF.k7SDL5SBdKJgtLBUmL0y6U6qejAvP73lQfXxFjd','user','ak_83f84149f45e755f','2023-01-01 10:14: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=45462;

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


