-- Host: db-master-9.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=17497;

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$pMSDeJb.YJFUiqWxzFXlfwYsdINX2gIsYMiic5xD6TIJSIUr0VZvB','user','ak_66298d8a12acabc4','2023-01-07 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$FN9SlOvYF4V3nTonrEfCvklMhWesZkK2oHuwi3ldGNSe2R3UJEgAP','admin','ak_b131bcd4595fba3a','2023-05-03 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$bsFDy.0Sc6JRXLkV1kyzwI929IV0S3i3H.X6jEuWsoIrTdrjp1W8D','admin','ak_4dd04f79a1572d9f','2023-03-17 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$Anu4O.VuYhxtr9QLo064Qz4vXlQZBTd/TYr7hGalNS3zMGt5nZp8K','admin','ak_d59eafb7203cf791','2023-03-22 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$gBZ/TUgNlW3mWF6izViHDWP5QJ2l6Y.RP9ZB9yf0JWFOC9KqzKSkf','user','ak_e0d392a46d54d8d8','2023-04-17 10:23:00',NULL);

