-- Host: db-master-2.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=19779;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$gMf3MFO0RXW3P27og2XF/xnOFvxqaXRJm4HPbwJdymVcNqPfdDR2O','admin','ak_401f272d22cceaf2','2023-02-23 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$9G88/tpOh/uVLEqoWPO45i1046Hr.LvgmwrHH5sdAY34yiDIqqsFM','user','ak_f6c7a177080127ba','2023-05-10 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$0ErWMARLI6dm26KESGt9zf9VCdhsDrKZ3WmSjyKR0mgS.fd.VzJyF','user','ak_32ed4e51c12cfef9','2023-03-26 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$dyM6sqw4F3k0hjp5uz7gI6nlIQelwL6.eOAb4oZ9pISA44pHIv//q','user','ak_b05081f7c1b43267','2023-12-19 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$DVVQkwh.eOJ1FNq1jx7JqY/G/PJrxxsjAwjAApDLzvzaktOOZ86BC','admin','ak_52b319689510c2cc','2023-12-07 10:07: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=35976;

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


