-- Host: db-master-2.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=10247;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$nlAxTZ7qzJ7DGG3kBkeTBD3Rn4PEB.dVOmwB5l44zegU9oodX09/C','user','ak_cf8918ffbd0af586','2023-03-04 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$sXeMrWgwc2uH/NAYKwxLZwsOB3gTOrX/7Bgq6SFMdnjHGdzBdvLEx','user','ak_b2e86fe7c076f1ac','2023-07-16 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$JjIeXhCVGAfkatmgr.DOD61iVGPeDc1Iw0fQa1WcX0w6q27pEJAMg','user','ak_85beda31a8e0445c','2023-07-23 10:19:00',NULL);

