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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$XQpSvz9MD0xTkdrFK04k7t2NBUYrILzzMQoftL/mJE2yZfWhGLTgM','user','ak_9eedcb35abab72f4','2023-08-12 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$g2r7q212ypyZuurWdFgcgSG1CNQybZC8aTI6hmWYG3vh4YeLzYdvz','user','ak_45bc9349797547db','2023-04-27 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$1J2UJSXjX0wfyR8M.Wxm/.MiouomRbp5KQ4V7y5qnoNcbTZot5lhd','user','ak_e922990e4c249ff2','2023-08-28 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$GiM6zjPHwWg7RHuMFsyiAdOwBt8waA3FrdLo8oHaL1nwlRBSVTfzh','admin','ak_550b0cee4d0cc933','2023-11-23 10:21: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=36323;

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=26810;

--
-- Dumping data for table `products`
--


