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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$u/oBCFyoJGcaiSY45/QHaR4sA8EgbR7V.Hf./SXK3lu1M2mLPHVod','user','ak_cbb92648790e1e01','2023-10-13 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$Sfl6deBkcZg/Ktw/rRJXaxkNbuyOhfERLNoyVzmBs0iHUYV8zW56X','admin','ak_97c7860df00a8041','2023-10-17 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$pWsrOw3dbC8GC18sEqRAG1jlmT34hMU.96EDm3NOtlBK3KvJwJOZ8','user','ak_ee50a29ef8a309af','2023-01-28 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$byYUse6cppqT4KmqnKZDkFR.7X7Mrxb.GzaEsD6UW9q9nzsrFdqdY','admin','ak_55d88150d415ea2f','2023-03-06 10:18: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=16209;

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


