-- Host: db-master-1.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=16925;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$xrGKlYerQHTicCMG1cqLnEFQG6isvfp9YmsbCEp5BxEWRlBNJcKTz','user','ak_198791ff1bc7dd9c','2023-11-01 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$pNFihCNBSxWwnU4z2doS6h5ooQJkSwRQFopXvor1ZdWKtUrvEpGTO','admin','ak_843de44caf037cbc','2023-03-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$.HQlmrwEPa6JwcpeA36fdPGWs5jmgyBlkjruzijgzu09QUHJdSszm','user','ak_abb35a43f865dba6','2023-09-19 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$/OFzGDZvUf6AViniV3KpxZS/xf9.pUZ2Wx0qD4cP5nuXcupriLPj4','user','ak_4726bc4a28bd49d5','2023-02-19 10:00:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=30819;

--
-- Dumping data for table `orders`
--


