-- Host: db-master-0.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=33817;

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$WB77nL8ONe8q/tW9pxxSyYCF655g0z7Ta2kU84alJOCXsC58P.T8V','admin','ak_dc80cc77bf4cc125','2023-03-05 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$QYTz2Mv3amCwNWqDTjFE6kQciJu9qnuSg2DfUqGOvukRHFh5JJZzv','user','ak_5601e434ab29e570','2023-04-15 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$Zvu/YrJWxqiHFFDyfax610705UNvHmk27t/aPNKJmZsaOARRDDiOb','user','ak_bb0a7b180b4d1e1c','2023-09-25 10:06: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=16310;

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


