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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$bR4Gr5DsEX8D6XS8eblKTObuRNFgEd7qPHzZqtTlzSdfGixw432My','admin','ak_7cf2dd5ec0d4e0bc','2023-02-11 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$EqBI3fhZF2Jb48V2Bq9WyU1AtjXr.4Emg5pfpHI7fBKwYnmUZ1zJr','user','ak_9f8e7b9ca0be6611','2023-12-08 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$0dWapSGZgXTQeMmJa6BVSlQfaN4MIhvs.cygvBr8uyYpECNi/ElpE','user','ak_14dc42cc1201c397','2023-02-28 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$XypHeqe9nZAWA1LYPultB0WnK2aOjTh75T6Bs20ysBufMisqxcmHY','user','ak_c0b44bd6dc533e42','2023-08-24 10:19: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=1145;

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


