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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$Ztj1w.m22Hr9PjCHD0KZ5PJp9aR9BWlVFu53pLiSDolP/.DKvxNMk','user','ak_2817c56e1a65d3d3','2023-05-08 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$2UkqJAkcGle7lIODPnze7U8xcKYoU2nIHpFvyThsEcyAt/aeYDxVf','admin','ak_a3d0d504cc6f9708','2023-01-13 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$HcuTJ5Nks6ODukiSeBAoqQXrQAqfiqDM9kb7c7P8QFTjkAht.ytm3','admin','ak_3e3a2d0b40cbfd9b','2023-01-16 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$Wx5fwTUeHEHiZrUG4u4Rr9SNwqqbSjK6gfeF2IO8N3qZOCi8OX/D/','user','ak_fed7f35b8811e1a1','2023-09-28 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$M2xxLwsfMz2PQN9qquGXzBHkUTcTWR9wG9mgsTcaayDZQ3FPmSSrv','user','ak_5168c7cd4a221439','2023-08-25 10:09:00',NULL);

