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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$PspJKhSCR0G.VAtaRafi/nI6R6jaxFEFv3dmuYaxcgx6xzyK8AH3L','user','ak_54463588367fb4fa','2023-03-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$6ra2UE1mNKDWRmAlB1a35yNRUEV4azCKST8OedIrUkdMjiIS4BLDI','user','ak_57ab652e2d6c3211','2023-03-19 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$H15NL5MtwbbpfJapZFpJjLsu1XqDPC6QRaRUOrvBmCs7nazF62z6z','user','ak_2f5af0dbc30155c3','2023-09-24 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$qWI7Wl7FmmR6AV0OTCRVjd3Cw/hvLQ0pok3nkSyw2kGrXp65KUAaW','admin','ak_979bcd9c93edc764','2023-06-26 10:21: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=8616;

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


