-- Host: db-master-8.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=42153;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$sTb.TysB0inrWZY4og/qLMykWqyF12Ad56/xqWxatVvpsa1c79TJs','user','ak_687cec0a5463c9a5','2023-02-04 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$lV/GkC67FEcW6rMtVrBdqw7vVswYqcFbPyA5TlQhLhHOPWWpPntKd','admin','ak_fc8b71479393493e','2023-05-11 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$DbJOM3z.eQ6v4AaZX5aahh1qDXhPJ1IGz.jlVPvDXv0KbM1BVzxpj','user','ak_f49a5a938022bdf9','2023-04-26 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$5Itki8PQoZya2MX9sa38O32f0/ifbRnIIZHx1jM.GhxGdfI5AxvRQ','user','ak_beb812da57462bb2','2023-08-25 10:16: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=32727;

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


