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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$NSdsRsptHknAtFR5t9sd2kEUdsk/w6C.ZrUFsPmFquuzp/LnAYEKZ','user','ak_5e5d12fea3a12d74','2023-11-15 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$8HEsRYFFuB5FBIxGqPA0u.N5AMfqVcuklevx8Ra8ZOzyr0JR1mVw7','user','ak_878c321e51cc2f83','2023-05-15 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$CuNuwhktClBVQ1D63UDDeBnJF0xPL2rPi/Wt/rG.KTDtMtbHH0sIb','user','ak_9bbab89ca68d6f93','2023-10-26 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$5MYwTIF2LKJrBU5MzpiRmBC.iVcIIiPSJWR9ANcKjx3yziYIFWywL','user','ak_f508baea0d6c3e9e','2023-08-12 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$D9N24JclL3XKqUaxus7R78Aur0S94GC79kd0xdktc9jXEJUYh.MrG','admin','ak_c388f6ad96705c76','2023-11-16 10:19:00',NULL);

