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


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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$gzo32mSP8m.aA.6CxZ2CTPNIfcDF9PVuxwfNTpWOm.8VvohiFUVMq','user','ak_07fafb852c318523','2023-11-20 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$WWO9s73AZdOKAM37th7aGTAreWDMio7jI3QN9djtGQQsNNPQBUHLC','user','ak_27533e81615c7da4','2023-06-07 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$j5mAp6uLa6gdUZmTROy5nL04eNU9A01KsG4aoHbg7PfJu8lVxEKaV','user','ak_f64fa1307f53c946','2023-01-05 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$yCZlkH3Y1skBqrExQ5M7DWhNCoh.x1/Pzi60RqeKeC2Px8fOBcyTg','admin','ak_0f7e87145da87335','2023-01-20 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$0uP2GKW89r8Ew5Skdrt4ZEjGBFhC0yXH1dbXmjqizKL8ceqNCh952','admin','ak_fe7e2ffcb6a1628d','2023-12-13 10:22:00',NULL);

