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

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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$UnVdv/5x6koPIrYAPeBpuCj0OXGxgwWXo4tHK2VteeIhZT3i.nUL5','user','ak_e25ca074360f9321','2023-02-14 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$yy90zOBRW1HkVKia/ceMZXbg3qQ/QoMJxWImUiYmyCmNfBK7/f/9D','admin','ak_f5439f74abdbde21','2023-07-17 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$Yd8A.4Mg33zmPvGFcp5YtZOVBzt5HLPSJE3smhSFQmr3swAgOI0E0','admin','ak_56d1d03f3165c5fe','2023-10-23 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$8sczhUCKCyFTYhomwIJSdhZhovwfDFyimRc9WQ4bs6QqGoLDb7yzV','user','ak_fefca3a6107243f3','2023-01-01 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$AVzAITYrch/mXBnQeFe5ara9G5m2H/5i1gOBDWMHhyrkS25Ez2viD','admin','ak_f688ced6fcc686f7','2023-06-06 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$FARv4E5EwXkEmVBy8YwOTHx0xQOAcA5yE9CohecL4B6.E3oY6VvQw','admin','ak_db6daecfb333bc3d','2023-06-20 10:22:00',NULL);

