-- Host: db-master-9.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=17560;

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$R6suSWTdDQ3b5aPdGMHBWPSzt8e.SXibOiNMWnS4ARHdeXpkeWCxS','user','ak_2aaf32ed7f8bcd23','2023-05-01 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$Xnf8jr5BFL07UTDMRkzve9de5w7uSKCcZcRGYLEn2LlV13vZu0FdS','user','ak_4280c06060ac9926','2023-12-03 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$0N9kiyM4X3T/hMd4vVvdZbn/KJG5u0LbEIE4otkDyizIWfHHP3.8V','admin','ak_df2f28388b1133d5','2023-05-03 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$WXQBwGaD8OWwK0mHRy4n8HtnofU.ZyVqnf4Jk1Q9s8SKpMgOAVryU','admin','ak_eec3d3d5741a77a2','2023-11-02 10:20:00',NULL);

