-- Host: db-master-9.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$BCqqRso58.ZjeJnoaNvRDJ0ArkrXOqAUgF5bc7ZjxXWmch0ynCCpZ','admin','ak_247e5a80d4f7182f','2023-01-10 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$tl8U3.Ya/wv5dQSswpqbM38UV3OzgB1OwyKIw2jjxRgZEaXsT8YmX','admin','ak_b2db83fdb80cde51','2023-01-25 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$Ph2IowePD3CBHFmKaB1K2Ettk2Kd0ZvTLdTKn2HP.ADMGLRLpcsvW','admin','ak_2646f967abfe5265','2023-11-24 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$1hK18tQyXRo2H14XbkWvmH.wujUC0HKAtm/2aYIGyP.odxBAakRKf','user','ak_522736e892f39ffc','2023-09-12 10:00: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=47974;

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


