-- Host: db-master-2.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$FdEnPJQ9KY/uQV5AXczRxfU5E2kfaPfiSp7xbhrRf7Xn07zcQboPI','admin','ak_219235742891b029','2023-08-09 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$X4TTrJcQWuQsJWddJK11ivvZWzkD2TrvxqmvzihUAw1.f.EKf8Che','admin','ak_d149800f209079af','2023-10-24 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$g541hihpMOObcBlwX5CbHmzxLecx6MSVe/cJ36755XM9wSY89dION','admin','ak_af9a500dc119b7d0','2023-01-14 10:04: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=11638;

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


