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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$2vf4b45MyeVEm0kuQe60kv2k.a3Xpo7qdRReO/9OrL2g8CpXs2h/.','user','ak_fdc355eb738d92ff','2023-01-21 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$5Dn3FKzd9jdsQDYlEl7QeoJ9HAPDAf1QW6kWya/XmrimmSaazWy6n','admin','ak_67b17da12eff30bf','2023-07-13 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$X/xlDQDb/7wqAL5QI9/yiMo/fT5cpdWQjNDYfATm8XtfGMkHwsOOc','user','ak_fed6e14e5a53c4b7','2023-08-08 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$GTFjHPE.3ZoVksWsh6jYa4xBppYE0YVG0CLewDJjMh2TjHuWZ9G3M','admin','ak_02360b7206eaf314','2023-05-09 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$z6BadTEjvTGGQu8mJ6ZyU/mQePteckykBGpVfyObGtuh8cpYpMHNL','user','ak_8f6de6131c50e1c2','2023-12-25 10:14:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=49270;

--
-- Dumping data for table `audit_log`
--


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

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


