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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$V63fonst52pFjkpqyWJFihwDN/AO5Se8NNWkfHTTtpD4xISxABCI8','user','ak_1f86326186131577','2023-11-17 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$RJuV9LvbLNltjg2rtXrDTVWqQ/piIxIOvgClox984VtWclRtgs0D7','admin','ak_036dbabe40d60d9c','2023-05-08 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$SHGondqEPIpjyic99B2yngUKgNrBPSIqLitwch2ArlRvfvXUmbZTf','user','ak_491f510f99c9c8f6','2023-01-12 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$p8pb2RJaskG52OyIvE36cNzi2KS57Ebdvl34CnLPmEmax/COp7lvI','admin','ak_f84259cf54916628','2023-07-24 10:11:00',NULL);

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

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


