-- Host: db-master-5.internal    Database: ecommerce


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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=4947;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$8KtNg/UKCUg/67xuTXLK8WqWrtMEQAVXHB2mctEmEns.44ZcbgZLc','user','ak_2c83a959d9ef8497','2023-05-21 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$3bc6SlUdjXXHVoap7HeDyyEpDtis3tc8WvxqunPsGJw1wV7ME4QVH','user','ak_3c61e8384d7e91df','2023-11-09 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$IH86gXB9LYcWgnE0X0ektlJ5b9uGvIQDBMo1ixaivh1J.7krQ3lmw','user','ak_340fa52d2183b9df','2023-03-24 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$mbnyYowo6E30cZpSiphJhKK6PQGD/qV739e8qra3B.xSOz9a.8gP4','user','ak_3097524091a1a409','2023-01-20 10:19:00',NULL);

