-- Host: db-master-6.internal    Database: main_app


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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$NwGLbt.xzYANyPDocmUYx1q8BS.0H1UShCeavFs8zHTDxHqR6TQ5P','user','ak_edd5d63ce7e6cfd4','2023-06-12 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$tzUb.18ZDVG.iPhHmWNsi3GPD1JDOLOQvTrv99XlXISVxU1DpHa9O','user','ak_ab439a7bfe278b9d','2023-09-02 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$3ZNji4nulUoNhJRSVFzsPAqo09k5uDsaAJ/C7FwNZY5Ce0IMWdkp8','user','ak_133cc734ea3de4fc','2023-06-27 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$46iMPITg00jTqS5PTG5RBXvlknjBO1iWTdlDQ2mrOSnUu10kezgbD','admin','ak_1e681cf82f0ef80b','2023-12-21 10:16:00',NULL);

