-- Host: db-master-6.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=44353;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$CnLUP4BwUSTqeyFM0DX2MDzWoMXnFmvVyMiesBLfj93sHX1kJST.Q','user','ak_754e763da2431248','2023-12-05 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$7G8P9yZfPOaIXfEG9C6p6XcmCHDAV515r/IjyJz7nvNcDWnnZyKas','admin','ak_c9005500c7c70497','2023-07-10 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$j.MyJXclHuoblq6oOweTAzmV/zXtw3.ceVcRcnDLHa4oeKfxXcj3O','user','ak_f70ebda395ff33a4','2023-07-09 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$AiAxk/5pdPAi/ujoV3FLQRhQIRvh1alkeDlyx/9hRS1Tnx59SMaLm','user','ak_8c8799d287e993bb','2023-09-19 10:16:00',NULL);

