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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$hrl7F1vaMUb5FEFKpOOtseQYV.pL7EATYZYemwQ5gKmud7mnN/QBv','user','ak_423f068d186b3861','2023-07-19 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$6L2CVt26YwgVVM47SdSs3X3gXxAuWj31C2bjbJZBjT9jb3Pyz.eX5','user','ak_103bd6c008d52c5a','2023-07-25 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$F9198HVt6W6lY1cWwwZOpayQRy3i6amrL5nvA26ZUsuUtujVFIcjm','admin','ak_555c14402d5ea46c','2023-05-07 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$SXJymVQ3IjmrAFiwZd.0Ue0vVp1IxbZKM1FEtPq3rGJUxiWFRFfp2','user','ak_6f6a143642c21e45','2023-01-06 10:10: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=34337;

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

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


