-- Host: db-master-9.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$ofQ3StRKFB/UceE6vTJDOkVEY0ty0IQiOlInj7ybkcSxBkA01KJfu','user','ak_d3feaee32307ef15','2023-09-23 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$kyylwzX3RvyH2qIFvLCGP5k7QqzbaDZi0LJhqDQq9JlToIbBdxNQS','user','ak_ff7e1a51410c3880','2023-02-03 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$luBR98VYqTCRF5PHashA1WoOUHUEfAZ35bdpWtWZlVGvc7l6MXTg/','admin','ak_0d853317f253f53f','2023-08-28 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$zB/7zYY4UGJokI4NiO.VhQgKVB1hVMy4qEFpKNGovF2ijM7ZmGs3Z','user','ak_5a1473c7f15f54cc','2023-06-23 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$6hT02jA5rg3FVUC0l4HUGbjW4QmpPX3NXeMlaS/1pIEiH.5gXlxi0','user','ak_79d1d5acf361e244','2023-09-11 10:03:00',NULL);

