-- Host: db-master-7.internal    Database: analytics


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$fWetbrjHHVHgSLyniTvtVPdqimbZD/nwR6RxpCTTTcLZ/d6DDzefX','user','ak_9b212b3831c3c17f','2023-04-24 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$2J5igtnnhCd3NGGDEcB.FtJBmDRjwjoav7qJUsRb61StOnArS7XSD','user','ak_2a1a5c86fedd7c62','2023-03-23 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$9V9Du9rC3IR1JOZWl/iHLtW2p4xonAVpnXU6VtzRTLLuyNwzeEIDx','admin','ak_5065547fd7de10b8','2023-07-09 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$Tg5M6GPsJHjjB5wT0cKofGFi.rij0MHfEeJRjd0WRdfFJ6ABS7tTN','admin','ak_987049dceb04795b','2023-12-27 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$eYoQ69CGYZp9H1yWe7S1g57s29TdbIKj/7pvuwEqw88X.FRFH.VQc','user','ak_72fce63185f05d78','2023-05-07 10:21:00',NULL);

