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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$pJ3C4mq0xvvhfxS8M46VXrQnzLvH6tNWvj/mok85PxxxYeHkuxJ5B','admin','ak_41de89f5261c867d','2023-11-05 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$6k2kmnkWn7.AFquHm5bMdfDGSpjwbyfBUwHnFEdV8mvVz7KeC.cK4','admin','ak_9bd34b736a866b32','2023-04-01 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$5M2O3IEnuH/0MBuzCcRwuZCExU7FW74pcyFSlbRh50topoPaIWZan','user','ak_8ed0a32125dbdea6','2023-05-04 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$U.lqg9q2qAt6Cygdfh0MlNQ3vpi0k6TFa.4h0IN.ZwrojQSyT7/d9','user','ak_512c499e0ee0e147','2023-06-19 10:20:00',NULL);

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

--
-- Dumping data for table `payments`
--


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

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


