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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$d9NIimcya0ogu.591cYc.7bMLrxZnxa3y/T7QoKz6aTnrvNgfDXXp','user','ak_b04c910c1c9b6bfa','2023-01-14 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$ZweI1sdU3pyGdVcRJ233XSVdB.iLPFOrpv9MGHbISlb3b5Wi.7qox','admin','ak_86b49c8db875ec55','2023-06-02 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$sv.RwqjtuMcHdaGFm8K4e7JD0y8O/R14hMYpvAvf/0gqjJ/ivZpm6','admin','ak_c4ffb01786762cf7','2023-06-16 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$Hf8bfD5KpSGtCq1bz2Ua9f5oIA2sKifVSj/qyN3GyLkd70WzPwnlJ','user','ak_530f87042ed28ab7','2023-12-03 10:19: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=32821;

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

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


