-- Host: db-master-5.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=10797;

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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=50231;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$zWlx5s/bmSXv.iro7tITVQCXJNGr6NW8GS64BjShmKlVCMS3jN70j','admin','ak_87401e7c52aabb97','2023-01-07 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$KhlFs5jvF6Im8YLM.MEHBwpeopn5Swj2MBFnR3eYYRd065Srz/Mqs','user','ak_80501965db24dd89','2023-04-03 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$NV0fruSv5jN.Xwxp8fKrZhTPi0x4TTXQSx6Ji8AuYVGzrD4PevyxI','user','ak_278ddf8dc40bbf67','2023-04-25 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$LyvFzN1lkyfYjr1rPrU/lSiwv5MYM/ad/FWxXg7GKhpc8Lrji08vv','user','ak_d29a146ad5c6cc2a','2023-07-19 10:06:00',NULL);

