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

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$DVuhDLyJOlCm9N88gRAwusAU2WYM4u.Vg4oIj0eQ.majdMQ/9xVjB','user','ak_4e6d6228197bd6a8','2023-01-19 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$LzJT26bFLF48ysv.SQO0AAP7eJCE2BedCoMa23ymv3qVTYfNyqGoN','admin','ak_63d7865998082820','2023-04-04 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$G2r28fD5fBF1g536ZZBGTBnyoSQlrqW58N/g9sFORjDQ.Fdi8YT6j','admin','ak_fa3601c70d0d202d','2023-08-13 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$iA51s91KVYK6NNeVphwHfZdUK8aoOGnnXqud2WxWw5WS9PB4OshTu','user','ak_989f46c859c974c8','2023-11-27 10:18:00',NULL);

