-- Host: db-master-3.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=50765;

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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$95X3dsufHiEmJOqlujU7RaJNOszK2aCGg99jZV9yeT24RcRvFOE8v','admin','ak_9616a9556aa90a0c','2023-10-25 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$fZ3iUiTUbGUna38pvAsJQPbbiXeWxXeboM9gg1EdsCXMYTO8r56HF','admin','ak_a175937726ad382f','2023-10-17 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$yv1KthjPBznf1zj0H5ozdLYIkzakbdPi.wQgAV4TY4/R0LBYwIETi','admin','ak_8688b4a359144ca5','2023-07-22 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$okeuTf6LfwpQYKTikJvKkzuD3hnQq3GxC5AP8RrWPziQdh2lCbs7b','user','ak_92a11259d74fc728','2023-01-18 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$djWN7OISClKE33CWa2Mgtc0NkKml3sLfeTImaQvMBXHkjoDV5PmIg','user','ak_3f986b44f19da6b9','2023-01-19 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$3CHx8CWdPgauh9OkiJobWzsxYEv8t99kLLYeQ..Zk0CR8XCbZnyQu','user','ak_8b4385bda42ff22b','2023-06-19 10:07:00',NULL);

