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

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=49112;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$k/FnKspMtZc2H/GryNCdupTyqdC7SKuVc9WCqZU3xl4GZedXQ8zPQ','user','ak_ae1bb752439bfe5a','2023-07-16 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$J7CBFPNLPf0gs3pq1ynmvw5ad9ddy8KMD489w2h0HC.FQPubGXtIQ','user','ak_6b55dbd7c450d525','2023-02-23 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$mONNUcWVRQT.GIIPMxb.zxNW81TEWReqE50/vXP6tQuQ9f964hLN/','admin','ak_ea6030e4865eeaf7','2023-05-13 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$.dRaMy6UY2ivpB0Tz4d7ZTFHUPj.UmL13yykWfi/w/nAzabPFOj31','user','ak_eb35d782771f2c62','2023-05-17 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$zv8Xd9EnABjFgSUZY8W0qxBVtILIfXe9v0sKXMDSNzULA4UgZQriU','user','ak_28731f02e1a4661b','2023-09-02 10:20:00',NULL);

