-- Host: db-master-8.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$oFHlJcH8lI3tthxwgOZBfRhwE5bxN2vphdFlOKsUSeLFRiOlr0Pki','admin','ak_2eb29369fdb066bb','2023-10-24 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$75aM1bV.T1kh0hyqLP/MiB0A.rSeHBqmzbd2fqe.m9UsOy8Mng0Dq','user','ak_1cffcaea4e5671dd','2023-05-21 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$BR4ZQ7KwzjLIW7PEe.B3JOWh5euvR6keoD/nQRdN..ySEeh.VFfht','user','ak_118a46e6dfc7b82d','2023-11-15 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$Be.r/U06qiNK1hHdx31fYKsKMSJlgmFxqlu5Gog0hid6s69B/VfuX','user','ak_d26374420eb0e02d','2023-10-27 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$CXHuMOLQzTZ9q/rSTZEctcUmVEzGHrA2hAnKvIc.jBQvnSjUu8uhF','user','ak_0ea010fce10a75e9','2023-07-09 10:11: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=27715;

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


