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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$avV889y98JLStmBfStG4ri..LVTb4gfW4RINRczMJlaQBcPrZ/mmB','user','ak_e5bfef2bab472789','2023-08-06 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$n0A/wBa1oqNcF5jOveIIwLhttQQJTSMGvuZN60CDUKl.s46h8NIWo','user','ak_18e5c4bae468afc8','2023-08-25 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$1.VxYsBowTcs27Y.fCBZPJaVShhFL3BM4ApNSvPYEe7T6ZS4sC3GU','admin','ak_eeabfa43ecfd5d92','2023-01-21 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$/0LZ//aqp7nUUbv6CYUJg.G9.NjBnjwCTxF/XnVHTpVjVs2c2Q4tL','user','ak_57acfc5ab6e0fb3e','2023-07-15 10:13:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=2928;

--
-- Dumping data for table `orders`
--


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

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


