-- Host: db-master-3.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=50491;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$frBkrgoSrGOq.QSBAlUwoUnrQoLGmGAOpqwLy249nQqShPdBCtrBL','user','ak_4ad1825adf3e304e','2023-05-22 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$0gQL9XqLbfqD/oi6JsPFwHU1JeOsf8czOOTFcYqtYS2MUDbvaXmgt','user','ak_b351245a1e8941f0','2023-05-09 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$gdu.cqjXqXYg3Ue2ep0sBt8vv5kem1zJtEG5p6bWNI7IyHAmNOYcC','admin','ak_d46d53677dcb7b03','2023-04-06 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$9o0YR34EPxZye1XCXY6NgxMwR8xGSnbz5/z51vPIgBnpdHTRAIEK0','user','ak_a6a6edade3f2a84a','2023-06-14 10:23: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=49382;

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


