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


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$eofFYgRS3z.vnWxvAZciSbnLdK4F9LuJjX9YaFa/sqdM5/tXzmkqp','user','ak_83e41d2a8b79a5d8','2023-08-10 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$JHPfvZtLzgk3AKK5p0ggMz1KyEkgd0j9uFnl7F9b561lEdKV04A3g','user','ak_5380a3d97e6c7086','2023-03-05 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$DggIc6Iw8gZnEoa3vdMdfZwYwsWuNuzSNuhC9jyfJiveEAd6j74YY','admin','ak_e4aad4c8f95454e2','2023-12-27 10:01:00',NULL);

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

--
-- Dumping data for table `payments`
--


