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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$UX.6.f3vO2C1HXtLWWgpvLYE1UPabn8IFEuCW4VJoKpNoAx0CBXrc','admin','ak_ca8f7fbbe683ca08','2023-10-23 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$oH6ips3h94oFk0tOGmHVdqdQoQEVuQhix.veeSln97NBqONSSYc0L','user','ak_de57b7859ff85b4a','2023-05-23 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$ETsg2ZsCWXVoFyFbHRNPFeCWbn3911t01aw..ExESUlv.7ngE61Jn','user','ak_31c8d25fb148fb09','2023-06-20 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$1IMKCnCWX/M2icreSvEYhfL64HTpgktF4sVNm0Av7/2ajEbhCUhbD','user','ak_82609ed62f7dc4e1','2023-07-09 10:21:00',NULL);

