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


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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$NacRU8FBeBf/NGVEgvqrL3w7h3sDCtZxD..pDOjjYQXO3Ba7L9HKv','user','ak_d037f183b9977a29','2023-06-14 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$M4xcMINkjKMtMl76R2RvNg9PXZgKRCEYIFjrMZFJyfIcQQm2RIo6a','user','ak_bbd5c197e972a04f','2023-09-09 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$YI3c.JOhqUnxxdzQb/nDAiazE9NC6I.68wSH2QSUQ7NyUsa0LNP4r','user','ak_69253530159d98df','2023-08-08 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$gvmT2A2asyZIcbK/EdHfhOZefaDthTtNR4HfBEI2BXZV8GrrCqUak','user','ak_a6cfbbad27cec3c9','2023-04-07 10:20:00',NULL);

