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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=39349;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$KJjnq7eBR5Ym15bmZ.0Mx.L/Z5bm5kLXFOvL4bbJoAgrj7qjmMw4v','user','ak_484a5e68bb8fa59f','2023-04-09 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$SexSGrvj6r0Mu3nn8vwLNT.Ja0rjMNatK7BvSQ6BD98pEvhiAUYb7','admin','ak_5e8706d141529dff','2023-07-03 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$o68hx7sD4LnfbtEbfXpYzr8UWWpmXob3csP2mjfcg18JU82ErJBu6','user','ak_1c33252993c37273','2023-08-04 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$so8nLiHeG.eNULMzTgZQDhNNHiKbJvDuS6b1K3wk77ouuw6qmVJps','user','ak_8dcc660176c20297','2023-04-09 10:19:00',NULL);

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

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


