-- Host: db-master-9.internal    Database: production_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=11603;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$D9HdNoppbdK/viAW7yVMlg3SffaNOeWIdmaFw6P2Gh0gw2TsbT9u9','user','ak_8f94503652c8f9f7','2023-02-07 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$TLLOUb3siXsmwLFELQZODM/LV1WfIdSQu1AU62GOsA2ZEBBhtBxTW','user','ak_4afa918276cd68e1','2023-09-22 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$V1s1D1Dj.5GdBz1qj8gQQ/YQQjGXR9pag8FYhAMG067gSe4UmQaiB','user','ak_21649b59dcf05685','2023-02-17 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$/F.aFHTVA3D45t38v74MQVuLaELEf8gqXtnC5LdnPEbAfcUT3jlBZ','admin','ak_758ef2d32c32ea3d','2023-08-06 10:04: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=21424;

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


