-- Host: db-master-4.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=8686;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$S7ZQHWag7RY5GCa80w7mQjI7hKqgXqxdmuD2KMB5NTYKHpBhQcOfX','user','ak_9508e72f463fe922','2023-01-17 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$3V4Ps.nZuKgIPRNi88/T/BxCngW3e6WUo4Rg4FOkAUgDAyW2QPC3A','user','ak_d29d70b2621b8b48','2023-01-06 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$zpPxE/HPjA/Sqi/sBBvSB7Z3ucgePU/8C77.XB1xbpIC46nwhnrgx','user','ak_40111d2216fd2bf7','2023-06-07 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$jviYnnJ7q8QUc0CHInpuYuPXnRrefZrrDasnAD3WkP8KTzB89RwK1','user','ak_96543901a11e8f8f','2023-01-19 10:01:00',NULL);

