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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$gweZXX0Kt04y0XR/6EGaB4ePgXFS9SGdImvtNIeLLwaxR4hqtxQKK','admin','ak_ef838e5910f2d432','2023-02-04 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$ELCFHtQQhNuaXQ/AM7/QeLKJvB0nnwvM5gJL/ToA6pOu7k2XmJTdM','user','ak_6c2edd5bc22b08ca','2023-08-01 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$ujfBX7HFGhBoSzDnogyB3Ne4SUWX3SX7kOIeAw22/GBwGGfcTqqCa','user','ak_d7e27d8948d31801','2023-02-05 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$bn4.VH.CrSs7S22iUt8VjXw5kua2NZbDmtzYboZv.to59e53uoJji','user','ak_c3daa94e148d9ea3','2023-08-13 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$m6n6eWzeniY8PX0XogrElxb.XCOkgEIlcCVDmeAizD5Z6BnRBSksG','admin','ak_842ab96cec0722ee','2023-06-10 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$.zbN8asmqalAz22vK6JqxvPCMFhxxpIM4ng6uZkbU9GVQu35E.sUo','user','ak_7357897e5e8df700','2023-02-05 10:03:00',NULL);

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

--
-- Dumping data for table `sessions`
--


