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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$s1VADMbD9TL87OkqIgdvIz6HdcXHaG8F7ieiJkxDtpOqNPTEK25zW','user','ak_14623b5d8a209633','2023-04-18 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$2RP46w6jBA1gmFqTrnKh4B5zwAFaoC43Ooqk9ja4/U4QUwpIi0l8.','user','ak_d2e15fb93b4f01e9','2023-08-08 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$TTh2.B9XdWoB9Dve1oPeyarONkx9n5IJf9dwpLnKN.kaQFksoSlaG','admin','ak_939ee051fdce090d','2023-02-28 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$zxkhHTFV3pcUhWyATvhOyKWVvLAEjQCQo5F79fvFF9bk4EHKNYiwF','user','ak_5a9d40a9ed8f4fc6','2023-01-25 10:18:00',NULL);

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

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


