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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$z5bFEky1ZHehWNVIUohbktV6VJaT2297kpJKE1WrUdIo9/UV/EsrD','user','ak_ca3ac742fb9b9bd0','2023-09-10 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$3dWDfrWG/mUTI298UT5W.fVzo/VLj2Df8OhcfuSwl17jDjMxZWjGu','user','ak_ed5ee6745fa9cdc5','2023-07-13 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$xs2njBuodpVFrOxjFwvW9EKvatcD/wTlx6tSfZHXuvqnlwRyXyxHf','user','ak_38c3b8e364716345','2023-09-05 10:10:00',NULL);

