-- Host: db-master-1.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=35622;

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$wyYJIMWVGConluEWdprrArEx/cNQhAV3z3awzD7NJSZIBW427td0L','user','ak_4c161da42838b999','2023-01-12 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$vMZxdVMvWwGDaohGTxDIR4JSzm.TPz1kgdtW2/qUEHDXjbSx.l7BO','user','ak_43a98e8bec9c76b7','2023-12-25 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$9jnz4LJYZKF.W57clpew4hOgIAiA7FG5OYtr5o9EgrDr9AavoFIT5','user','ak_adc7b8b8eaac5a41','2023-10-05 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$PA7QyGrtv.JKSfQOZprjH57rVDzU4dsEdf7wRpygFevAmXzJnhMMc','user','ak_bf441e5907488d1f','2023-02-28 10:09: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=47155;

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

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


