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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$xk1rMgQjC.l8.D4TYFgkFsR7NSRqox/FTCJ.Q.gmv.6MNnQSaCWbs','user','ak_9f60f3a45ee66630','2023-10-09 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$cVK7pVCXy4a69ghXAotYbFVMa3L6JZ3gQOSrk/kb0hYZBCgAnQ981','admin','ak_1496ae47a936d4a3','2023-11-18 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$s8BEtTdlsE3LLrN8ArcHKuxYBYOLkWpAj/CljcG8JYVjzTqS7o5g8','admin','ak_e3737c07e0aab855','2023-10-13 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$pbqntEFe36hXvBf.mnEgOFi5qQVsR/7xomoxdv8vd/JG02ZII21.v','user','ak_d4e1db0e3e26fd9c','2023-04-07 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$4TH0R2Otzg63OgKeu8TEMyb.ERWdzfhUosVwcd9pRwt.MSaBuJ3vY','user','ak_111bb5e005e5eec8','2023-02-03 10:14: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=46376;

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


