-- Host: db-master-2.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=9346;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$CSzDECOGb1Nou0yBRg9aiJzPOveRrWBdv7nXXlzW4oKx6fOlQgnKV','admin','ak_d20f661b0a08132a','2023-02-26 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$/NAMYHcVliVtQ7HMzoSjTVuBYPjJYqh7Ia0xl133VFFfoylnDKwOo','user','ak_adf972ba7a46f429','2023-09-11 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$JYmEb.iJpG3l34dF0YQtPxm59H1HPN.P.JBXKlkb7jqeA1mV6PtEG','user','ak_7e02d7993e93cc05','2023-08-08 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$N4VPonRepMSzh4gsQW0/L5z32Iw1lnED8fSdK7WmM3C59C144xb/L','admin','ak_50727b2d8f68cc8a','2023-11-17 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$0NFI0DtjImmAJjhHkY8LyQX/xtoJog.E90pxqHlMHl94GxiNQTL.y','admin','ak_9725411221445ac8','2023-03-04 10:10:00',NULL);

