-- Host: db-master-1.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=23708;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$sNI9j5eqHZDZQgYIELijhS9jY2uSp/8OcrA.BjK42naepZza5pee6','admin','ak_eecaa5356c13e761','2023-07-15 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$o6zdgkpKVOZ5vdvPvgZcgM36QRXC/qKD46x.9HfZZKER5W8agd8zP','user','ak_c1fbe6623bd22bf8','2023-04-13 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$yq4yrSIiKzEE4BGDCiOmvFsT7dFFOs1ipRtFNB8dbMkRiPAzw/Nlz','user','ak_9376293153325488','2023-12-17 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$a1DC6Nel3Rj0wnIZNL6VftZkDqk7itbKpa/XUKW5PNo/sM8AbBFix','user','ak_1bca70069eb06fa4','2023-10-06 10:02:00',NULL);

