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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$JyAgKVyfnr3rzqXsQ/Yqtydk3mX2x/9njk492njY0y1YIpqCFunFd','admin','ak_eb4f5e5e700fac85','2023-08-02 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$2lP0SXLiHs.LZ1RFp/IYxq7IoCApyiu72vrkSroKXMk0BRGZwDLf7','admin','ak_2491238cb6b23f9f','2023-03-02 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$ZAzKYjoTS1wTteS8NaPOromtZ8/VJMCSr951M.//CrCcizewIlJth','user','ak_25ddd041b2552e2e','2023-04-25 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$vWoOeWw19mv2TwON/5WTB56JglpRuug13hCREsBggRvNisZu6EX6G','user','ak_bfbbf73505e0f3b3','2023-05-24 10:02:00',NULL);

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

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


