-- Host: db-master-0.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=48714;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$X7dG/OCBUyPWD8C/rgsC5cd4OpmGXQ1vRC966YBquSIxCjdANEMoy','user','ak_a0b53ee5ec58fc45','2023-09-05 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Aj/SZt5zj7eZz7tjPubqO2XQDgcnrxsk0COWk8tmjSsnQ6dWLkCxi','admin','ak_07e9ff6faa8b436b','2023-04-26 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$InZAs7jbdd0LprXgk2Uuz3i3bq1CnRgMqJ/23NFT7wOK0PsHkxaSV','user','ak_ac1933c0793fadd6','2023-01-16 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$bvAmb.MhOGcZMF0H9JqvGb4tEOBOfmy/nskTLhCyE0z.DrioEgDQW','user','ak_44cf6971862f77ce','2023-01-12 10:03: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=14030;

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


