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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$jy3Brm3LpUO3xEu2TLyBgYiZ9BywYwuak0yqRtnEM.i/YLDFV3x.P','user','ak_4d23ba4862d8406d','2023-03-02 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$5s4ILCgCKGLf.314UG5oUGdUsHbormXHQI683b5MtxF.PmFaNGLKo','user','ak_f708a7bb1408e792','2023-10-21 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$gUbXNKNsr4UxUXhkU1yMdlgg50BliBunbKXg8jXTF.tdpk0R39LWn','user','ak_6143b2bfd853ee4c','2023-11-06 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$FOHb72gJVdlu.lBak8dN/GYOARhhLWA0EswO96UNj7LCUGEuvZLbA','user','ak_881c5ec94ff82800','2023-01-22 10:20:00',NULL);

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

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


