-- Host: db-master-2.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=12355;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$um2ENW/SyldbhoEeMzGk67HaqVYjswKqcO1y8/OjEyIkQUgOtqaRP','user','ak_f9521535542f8a38','2023-04-16 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$3r2.0Wq5PbUNqx7dom45F2H/U0NPsDjUxeFw9ohqBcvW6ivcvtcuE','user','ak_ac9a9c2b86c34c2e','2023-04-02 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$kLobVtYHXf7ek4fX7zmJUbrKFlJTHhrZ6NooUgtPoMs0sG9tftXiQ','admin','ak_75bdf445e9702144','2023-04-08 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$G854ZQ7WTEMdJ49O2ekU6xRWt35QiQC9i8KrGoQg2/RQEpGeBQSfF','user','ak_ab107fd2963e8fbf','2023-06-23 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$wE.lSB0/6DqrONdXc/bYvc6Y4xx.etpPSNrN9SH5R.tjBuvdyIUp4','user','ak_e02bef690d116724','2023-09-23 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=31876;

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


