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


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$Cluad0Bo61EyFqqkHnYmyAOHt4RLT4wsHxJ4xm6m6Nb9tLp8gQqox','user','ak_352a89c5bee9596a','2023-12-15 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$JOvOZV7EkuRd16/cIUfmi7peAOx6M.1t6osneonCdDNKWVgBwwSHi','admin','ak_43cc0da1dbf42e08','2023-10-26 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$q.NAbQTPB7K9A9Y73ruCGzYzxo7FZ5FTTFBgRjhjF/b26gBlCL9Al','admin','ak_d3442def679c1e60','2023-01-18 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$DCcBq/zyOuK7ya.dgOkMO9Cw2NSnMRfaJPasH3J3fqPWUae8FJcBl','admin','ak_d644be060efc8b38','2023-07-02 10:07:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=22276;

--
-- Dumping data for table `sessions`
--


